mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 22:42:25 -04:00
Use fieldsAreBlank with the previous note
This commit is contained in:
parent
d598434bde
commit
6fc89d2f96
1 changed files with 2 additions and 4 deletions
|
@ -186,9 +186,7 @@ question on all cards."""), help="AddItems")
|
||||||
|
|
||||||
def _addCards(self):
|
def _addCards(self):
|
||||||
self.editor.saveAddModeVars()
|
self.editor.saveAddModeVars()
|
||||||
note = self.editor.note
|
if not self.addNote(self.editor.note):
|
||||||
note = self.addNote(note)
|
|
||||||
if not note:
|
|
||||||
return
|
return
|
||||||
tooltip(_("Added"), period=500)
|
tooltip(_("Added"), period=500)
|
||||||
# stop anything playing
|
# stop anything playing
|
||||||
|
@ -222,7 +220,7 @@ question on all cards."""), help="AddItems")
|
||||||
|
|
||||||
def ifCanClose(self, onOk):
|
def ifCanClose(self, onOk):
|
||||||
def afterSave():
|
def afterSave():
|
||||||
ok = (self.editor.fieldsAreBlank() or
|
ok = (self.editor.fieldsAreBlank(self.previousNote) or
|
||||||
askUser(_("Close and lose current input?"), defaultno=True))
|
askUser(_("Close and lose current input?"), defaultno=True))
|
||||||
if ok:
|
if ok:
|
||||||
onOk()
|
onOk()
|
||||||
|
|
Loading…
Reference in a new issue