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
ui.dialogs.get("AddCards", self)
def onEditDeck(self):
ui.dialogs.get("CardList", self)
if self.isCramming():
def cramEditWarning(self):
self.showToolTip(_("""\
<h1>Cramming</h1>
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):