mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
f410ca5e78
commit
4ae788561b
@ -128,6 +128,9 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{
|
||||
def set_readonly(self, what):
|
||||
self.readonly = what
|
||||
|
||||
def focus_self(self):
|
||||
self.setFocus(Qt.TabFocusReason)
|
||||
|
||||
def do_clear(self, *args):
|
||||
c = self.textCursor()
|
||||
c.beginEditBlock()
|
||||
@ -135,7 +138,7 @@ class EditorWidget(QTextEdit, LineEditECM): # {{{
|
||||
c.movePosition(QTextCursor.End, QTextCursor.KeepAnchor)
|
||||
c.removeSelectedText()
|
||||
c.endEditBlock()
|
||||
self.setFocus(Qt.OtherFocusReason)
|
||||
self.focus_self()
|
||||
clear_text = do_clear
|
||||
|
||||
def do_bold(self):
|
||||
|
Loading…
x
Reference in New Issue
Block a user