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:
Kovid Goyal 2021-04-15 09:57:52 +05:30
parent 718d33bc2f
commit 3f2bc45368
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -457,7 +457,8 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{
def do_alignment(self, which):
with self.editing_cursor() as c:
fmt = QTextBlockFormat()
c = self.textCursor()
fmt = c.blockFormat()
fmt.setAlignment(which)
c.setBlockFormat(fmt)