From 01c4b48c7d9ce880e8c193ce6f00194f267f8e3b Mon Sep 17 00:00:00 2001 From: llama <100429699+iamllama@users.noreply.github.com> Date: Sun, 9 Feb 2025 20:58:21 +0800 Subject: [PATCH] only change notetype/deck when reopening if no changes to discard (#3798) --- qt/aqt/addcards.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt/aqt/addcards.py b/qt/aqt/addcards.py index 2aae316fb..86e8a25b1 100644 --- a/qt/aqt/addcards.py +++ b/qt/aqt/addcards.py @@ -110,6 +110,9 @@ class AddCards(QMainWindow): ) def reopen(self, mw: AnkiQt) -> None: + if not self.editor.fieldsAreBlank(): + return + defaults = self.col.defaults_for_adding( current_review_card=self.mw.reviewer.card )