From 3f551e70f97f32056981270166d09368422084f9 Mon Sep 17 00:00:00 2001 From: Shawn M Moore Date: Mon, 15 Feb 2010 13:49:43 -0500 Subject: [PATCH] Keep track of whether the FactEditor is used for Add or Edit --- ankiqt/ui/addcards.py | 1 + ankiqt/ui/facteditor.py | 1 + 2 files changed, 2 insertions(+) diff --git a/ankiqt/ui/addcards.py b/ankiqt/ui/addcards.py index bda54ef06..a3d78382d 100644 --- a/ankiqt/ui/addcards.py +++ b/ankiqt/ui/addcards.py @@ -51,6 +51,7 @@ class AddCards(QDialog): self.editor = ui.facteditor.FactEditor(self, self.dialog.fieldsArea, self.parent.deck) + self.editor.addMode = True def addChooser(self): self.modelChooser = ui.modelchooser.ModelChooser(self, diff --git a/ankiqt/ui/facteditor.py b/ankiqt/ui/facteditor.py index d582811e0..d403372b0 100644 --- a/ankiqt/ui/facteditor.py +++ b/ankiqt/ui/facteditor.py @@ -42,6 +42,7 @@ class FactEditor(object): self.deck = deck self.fact = None self.fontChanged = False + self.addMode = False self.setupFields() self.onChange = None self.onFactValid = None