From 6fc89d2f96d8b1d7bc55e47c0ce088fe236e249f Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Thu, 21 Nov 2019 02:18:52 +0100 Subject: [PATCH] Use fieldsAreBlank with the previous note --- aqt/addcards.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/aqt/addcards.py b/aqt/addcards.py index 3372dd437..d4e7e27c8 100644 --- a/aqt/addcards.py +++ b/aqt/addcards.py @@ -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()