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."
|
||||
if not self.note:
|
||||
return
|
||||
self.saveTags()
|
||||
if self.mw.app.focusWidget() != self.web:
|
||||
# if no fields are focused, there's nothing to save
|
||||
return
|
||||
# move focus out of fields and save tags
|
||||
self.parentWindow.setFocus()
|
||||
self.saveTags()
|
||||
# and process events so any focus-lost hooks fire
|
||||
self.mw.app.processEvents()
|
||||
|
||||
|
|
Loading…
Reference in a new issue