From 81997992498135f8cd01977ef79270eedba59afe Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Mon, 19 Jul 2010 20:31:11 +0900 Subject: [PATCH] warn about cram for edit current too --- ankiqt/ui/main.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 8d3b731c5..6c52af96c 100755 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -1829,15 +1829,20 @@ You are currently cramming. Please close this deck first.""")) return ui.dialogs.get("AddCards", self) - def onEditDeck(self): - ui.dialogs.get("CardList", self) - if self.isCramming(): - self.showToolTip(_("""\ + def cramEditWarning(self): + self.showToolTip(_("""\

Cramming

You are currently cramming. Any edits you make to this deck will be lost when you close the deck.""")) + def onEditDeck(self): + ui.dialogs.get("CardList", self) + if self.isCramming(): + self.cramEditWarning() + def onEditCurrent(self): + if self.isCramming(): + self.cramEditWarning() self.moveToState("editCurrentFact") def onDeckProperties(self):