mirror of
https://github.com/ankitects/anki.git
synced 2025-09-20 06:52:21 -04:00
make sure field saved before toggling mark/suspend
This commit is contained in:
parent
772f6d7776
commit
84d6f88e71
1 changed files with 6 additions and 0 deletions
|
@ -829,6 +829,8 @@ where id in (%s)""" % ",".join([
|
|||
self.updateAfterCardChange()
|
||||
|
||||
def addTags(self, tags=None, label=None):
|
||||
# focus lost hook may not have chance to fire
|
||||
self.editor.saveFieldsNow()
|
||||
if tags is None:
|
||||
(tags, r) = ui.utils.getTag(self, self.deck, _("Enter tags to add:"))
|
||||
else:
|
||||
|
@ -844,6 +846,8 @@ where id in (%s)""" % ",".join([
|
|||
self.updateAfterCardChange()
|
||||
|
||||
def deleteTags(self, tags=None, label=None):
|
||||
# focus lost hook may not have chance to fire
|
||||
self.editor.saveFieldsNow()
|
||||
if tags is None:
|
||||
(tags, r) = ui.utils.getTag(self, self.deck, _("Enter tags to delete:"))
|
||||
else:
|
||||
|
@ -866,6 +870,8 @@ where id in (%s)""" % ",".join([
|
|||
return self.currentCard and self.currentCard.priority == -3
|
||||
|
||||
def onSuspend(self, sus):
|
||||
# focus lost hook may not have chance to fire
|
||||
self.editor.saveFieldsNow()
|
||||
if sus:
|
||||
self._onSuspend()
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue