Merge pull request #166 from Glutanimate/prevent-empty-notes

Remove temporary notes when switching note model
This commit is contained in:
Damien Elmes 2017-02-18 22:30:10 +10:00 committed by GitHub
commit f5b7f775f8

View File

@ -106,6 +106,7 @@ class AddCards(QDialog):
note.fields[n] = oldNote.fields[n] note.fields[n] = oldNote.fields[n]
except IndexError: except IndexError:
pass pass
self.removeTempNote(oldNote)
self.editor.currentField = 0 self.editor.currentField = 0
self.editor.setNote(note, focus=True) self.editor.setNote(note, focus=True)