mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 15:02:21 -04:00
set fact to False before deleting cards
This commit is contained in:
parent
ebebd93548
commit
5c89a0cc60
2 changed files with 4 additions and 1 deletions
|
@ -818,6 +818,9 @@ where id in (%s)""" % ",".join([
|
|||
except:
|
||||
# card has been deleted
|
||||
return
|
||||
# ensure the change timer doesn't fire after deletion but before reset
|
||||
self.editor.saveFieldsNow()
|
||||
self.editor.fact = None
|
||||
self.dialog.tableView.setFocus()
|
||||
self.deck.setUndoStart(n)
|
||||
self.deck.deleteCards(cards)
|
||||
|
|
|
@ -477,7 +477,7 @@ class FactEditor(object):
|
|||
|
||||
def onFocusLost(self, widget):
|
||||
from ankiqt import mw
|
||||
if self.fact is None:
|
||||
if not self.fact:
|
||||
# editor or deck closed
|
||||
return
|
||||
if mw.inDbHandler:
|
||||
|
|
Loading…
Reference in a new issue