mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Metadata comments editor: Fix setting block alignment destroying other block level properties. Fixes #1924187 [Edit metadata: Text alignment on lists in WYSIWYG editor](https://bugs.launchpad.net/calibre/+bug/1924187)
This commit is contained in:
parent
718d33bc2f
commit
3f2bc45368
@ -457,7 +457,8 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{
|
|||||||
|
|
||||||
def do_alignment(self, which):
|
def do_alignment(self, which):
|
||||||
with self.editing_cursor() as c:
|
with self.editing_cursor() as c:
|
||||||
fmt = QTextBlockFormat()
|
c = self.textCursor()
|
||||||
|
fmt = c.blockFormat()
|
||||||
fmt.setAlignment(which)
|
fmt.setAlignment(which)
|
||||||
c.setBlockFormat(fmt)
|
c.setBlockFormat(fmt)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user