mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
fix onNote potentially discarding editor field changes (#4001)
This commit is contained in:
parent
97b12b420a
commit
413b73d9f4
1 changed files with 6 additions and 4 deletions
|
@ -1244,11 +1244,13 @@ class Browser(QMainWindow):
|
|||
self._line_edit().selectAll()
|
||||
|
||||
def onNote(self) -> None:
|
||||
assert self.editor is not None
|
||||
assert self.editor.web is not None
|
||||
def cb():
|
||||
assert self.editor is not None and self.editor.web is not None
|
||||
self.editor.web.setFocus()
|
||||
self.editor.loadNote(focusTo=0)
|
||||
|
||||
self.editor.web.setFocus()
|
||||
self.editor.loadNote(focusTo=0)
|
||||
assert self.editor is not None
|
||||
self.editor.call_after_note_saved(cb)
|
||||
|
||||
def onCardList(self) -> None:
|
||||
self.form.tableView.setFocus()
|
||||
|
|
Loading…
Reference in a new issue