warn about cram for edit current too

This commit is contained in:
Damien Elmes 2010-07-19 20:31:11 +09:00
parent bbc7c2f660
commit 8199799249

View file

@ -1829,15 +1829,20 @@ You are currently cramming. Please close this deck first."""))
return return
ui.dialogs.get("AddCards", self) ui.dialogs.get("AddCards", self)
def onEditDeck(self): def cramEditWarning(self):
ui.dialogs.get("CardList", self)
if self.isCramming():
self.showToolTip(_("""\ self.showToolTip(_("""\
<h1>Cramming</h1> <h1>Cramming</h1>
You are currently cramming. Any edits you make to this deck You are currently cramming. Any edits you make to this deck
will be lost when you close the 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): def onEditCurrent(self):
if self.isCramming():
self.cramEditWarning()
self.moveToState("editCurrentFact") self.moveToState("editCurrentFact")
def onDeckProperties(self): def onDeckProperties(self):