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(
|
name = ui.utils.getOnlyText(
|
||||||
prompt, default=name, title=_("New Deck"))
|
prompt, default=name, title=_("New Deck"))
|
||||||
if not name:
|
if not name:
|
||||||
|
self.moveToState("noDeck")
|
||||||
return
|
return
|
||||||
found = False
|
found = False
|
||||||
for c in bad:
|
for c in bad:
|
||||||
|
|
@ -952,6 +953,7 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
|
||||||
defaultno=True):
|
defaultno=True):
|
||||||
os.unlink(path)
|
os.unlink(path)
|
||||||
else:
|
else:
|
||||||
|
self.moveToState("noDeck")
|
||||||
return
|
return
|
||||||
self.deck = DeckStorage.Deck(path)
|
self.deck = DeckStorage.Deck(path)
|
||||||
self.deck.initUndo()
|
self.deck.initUndo()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue