mirror of
https://github.com/ankitects/anki.git
synced 2025-12-13 06: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)
|
self.deck.setUndoEnd(n)
|
||||||
|
|
||||||
def onFocusLost(self, widget):
|
def onFocusLost(self, widget):
|
||||||
|
from ankiqt import mw
|
||||||
if self.fact is None:
|
if self.fact is None:
|
||||||
# editor or deck closed
|
# editor or deck closed
|
||||||
return
|
return
|
||||||
|
if mw.inDbHandler:
|
||||||
|
return
|
||||||
self.saveFields()
|
self.saveFields()
|
||||||
field = self.widgets[widget]
|
field = self.widgets[widget]
|
||||||
self.fact.focusLost(field)
|
self.fact.focusLost(field)
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue