mirror of
https://github.com/ankitects/anki.git
synced 2025-09-25 09:16:38 -04:00
warn about cram for edit current too
This commit is contained in:
parent
bbc7c2f660
commit
8199799249
1 changed files with 9 additions and 4 deletions
|
@ -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)
|
self.showToolTip(_("""\
|
||||||
if self.isCramming():
|
|
||||||
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):
|
||||||
|
|
Loading…
Reference in a new issue