mirror of
git://github.com/kovidgoyal/calibre.git
synced 2026-04-29 09:12:58 +02:00
...
This commit is contained in:
parent
f410ca5e78
commit
4ae788561b
1 changed files with 4 additions and 1 deletions
|
|
@ -128,6 +128,9 @@ def __init__(self, parent=None):
|
|||
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 @@ def do_clear(self, *args):
|
|||
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…
Reference in a new issue