mirror of
https://github.com/ankitects/anki.git
synced 2025-09-21 07:22:23 -04:00
make sure deck is saved before cram, fix bug with no matching tags
This commit is contained in:
parent
dd83f7a2de
commit
50fa426058
1 changed files with 2 additions and 2 deletions
|
@ -1359,12 +1359,13 @@ day = :d""", d=yesterday)
|
|||
ui.utils.showInfo(
|
||||
_("Already cramming. Please close this deck first."))
|
||||
return
|
||||
if not self.save(required=True):
|
||||
return
|
||||
(s, ret) = ui.utils.getTag(self, self.deck, _("Tags to cram:"),
|
||||
help="CramMode", tags="all")
|
||||
if not ret:
|
||||
return
|
||||
s = unicode(s)
|
||||
self.deck.save()
|
||||
# open tmp deck
|
||||
ndir = tempfile.mkdtemp(prefix="anki")
|
||||
path = os.path.join(ndir, "cram.anki")
|
||||
|
@ -1376,7 +1377,6 @@ day = :d""", d=yesterday)
|
|||
e.exportInto(path)
|
||||
if not e.exportedCards:
|
||||
ui.utils.showInfo(_("No cards matched the provided tags."))
|
||||
p.finish()
|
||||
return
|
||||
if self.config['randomizeOnCram']:
|
||||
n = 4
|
||||
|
|
Loading…
Reference in a new issue