From 936bb3199753bfe694f68067722ad75bf82b1fe2 Mon Sep 17 00:00:00 2001 From: Arthur Milchior Date: Sun, 26 Apr 2020 16:09:14 +0200 Subject: [PATCH] onModelChange save note I like the way onModelChange is done. Except that you forget to use the note you computed. --- qt/aqt/addcards.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt/aqt/addcards.py b/qt/aqt/addcards.py index 8b4da53a2..ed725c50a 100644 --- a/qt/aqt/addcards.py +++ b/qt/aqt/addcards.py @@ -114,6 +114,9 @@ class AddCards(QDialog): except IndexError: pass self.removeTempNote(oldNote) + self.editor.note = note + # When on model change is called, reset is necessarily called. + # Reset load note, so it is not required to load it here. def onReset(self, model: None = None, keep: bool = False) -> None: oldNote = self.editor.note