mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 07:52:24 -04:00
make sure we save tags regardless of where the focus is
This commit is contained in:
parent
61c577df85
commit
b77ab05421
1 changed files with 1 additions and 1 deletions
|
@ -579,12 +579,12 @@ class Editor(object):
|
||||||
"Must call this before adding cards, closing dialog, etc."
|
"Must call this before adding cards, closing dialog, etc."
|
||||||
if not self.note:
|
if not self.note:
|
||||||
return
|
return
|
||||||
|
self.saveTags()
|
||||||
if self.mw.app.focusWidget() != self.web:
|
if self.mw.app.focusWidget() != self.web:
|
||||||
# if no fields are focused, there's nothing to save
|
# if no fields are focused, there's nothing to save
|
||||||
return
|
return
|
||||||
# move focus out of fields and save tags
|
# move focus out of fields and save tags
|
||||||
self.parentWindow.setFocus()
|
self.parentWindow.setFocus()
|
||||||
self.saveTags()
|
|
||||||
# and process events so any focus-lost hooks fire
|
# and process events so any focus-lost hooks fire
|
||||||
self.mw.app.processEvents()
|
self.mw.app.processEvents()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue