mirror of
https://github.com/ankitects/anki.git
synced 2025-11-11 07:07:13 -05:00
if new deck canceled, make sure to move to noDeck
This commit is contained in:
parent
b6bcad4b9b
commit
e6c6a10c62
1 changed files with 2 additions and 0 deletions
|
|
@ -933,6 +933,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
|||
name = ui.utils.getOnlyText(
|
||||
prompt, default=name, title=_("New Deck"))
|
||||
if not name:
|
||||
self.moveToState("noDeck")
|
||||
return
|
||||
found = False
|
||||
for c in bad:
|
||||
|
|
@ -952,6 +953,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
|||
defaultno=True):
|
||||
os.unlink(path)
|
||||
else:
|
||||
self.moveToState("noDeck")
|
||||
return
|
||||
self.deck = DeckStorage.Deck(path)
|
||||
self.deck.initUndo()
|
||||
|
|
|
|||
Loading…
Reference in a new issue