diff --git a/src/calibre/gui2/comments_editor.py b/src/calibre/gui2/comments_editor.py index 0325a36826..3c4e70ce16 100644 --- a/src/calibre/gui2/comments_editor.py +++ b/src/calibre/gui2/comments_editor.py @@ -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)