From d62fd820e42fa5d32de6f00224a065b2a806f0e0 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 )