mirror of
https://github.com/ankitects/anki.git
synced 2025-12-11 05:46:55 -05:00
ignore focusout event if in db handler
This commit is contained in:
parent
baf3ceeef6
commit
ec684b6367
1 changed files with 3 additions and 0 deletions
|
|
@ -477,9 +477,12 @@ class FactEditor(object):
|
|||
self.deck.setUndoEnd(n)
|
||||
|
||||
def onFocusLost(self, widget):
|
||||
from ankiqt import mw
|
||||
if self.fact is None:
|
||||
# editor or deck closed
|
||||
return
|
||||
if mw.inDbHandler:
|
||||
return
|
||||
self.saveFields()
|
||||
field = self.widgets[widget]
|
||||
self.fact.focusLost(field)
|
||||
|
|
|
|||
Loading…
Reference in a new issue