mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -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):
|
||||
self.editor.saveAddModeVars()
|
||||
note = self.editor.note
|
||||
note = self.addNote(note)
|
||||
if not note:
|
||||
if not self.addNote(self.editor.note):
|
||||
return
|
||||
tooltip(_("Added"), period=500)
|
||||
# stop anything playing
|
||||
|
@ -222,7 +220,7 @@ question on all cards."""), help="AddItems")
|
|||
|
||||
def ifCanClose(self, onOk):
|
||||
def afterSave():
|
||||
ok = (self.editor.fieldsAreBlank() or
|
||||
ok = (self.editor.fieldsAreBlank(self.previousNote) or
|
||||
askUser(_("Close and lose current input?"), defaultno=True))
|
||||
if ok:
|
||||
onOk()
|
||||
|
|
Loading…
Reference in a new issue