mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
catch v2 sched export before file created
https://anki.tenderapp.com/discussions/beta-testing/1210-scheduling-error#comment_45692960
This commit is contained in:
parent
475e2ab398
commit
a9f69b329f
1 changed files with 5 additions and 1 deletions
|
@ -7,7 +7,7 @@ import re
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
import aqt
|
import aqt
|
||||||
from aqt.utils import getSaveFile, tooltip, showWarning, askUser, \
|
from aqt.utils import getSaveFile, tooltip, showWarning, askUser, \
|
||||||
checkInvalidFilename
|
checkInvalidFilename, showInfo
|
||||||
from anki.exporting import exporters
|
from anki.exporting import exporters
|
||||||
from anki.hooks import addHook, remHook
|
from anki.hooks import addHook, remHook
|
||||||
from anki.lang import ngettext
|
from anki.lang import ngettext
|
||||||
|
@ -85,6 +85,10 @@ class ExportDialog(QDialog):
|
||||||
deck_name = self.decks[self.frm.deck.currentIndex()]
|
deck_name = self.decks[self.frm.deck.currentIndex()]
|
||||||
deck_name = re.sub('[\\\\/?<>:*|"^]', '_', deck_name)
|
deck_name = re.sub('[\\\\/?<>:*|"^]', '_', deck_name)
|
||||||
|
|
||||||
|
if not self.isVerbatim and self.isApkg and self.exporter.includeSched:
|
||||||
|
showInfo("Please switch to the regular scheduler before exporting a single deck .apkg with scheduling.")
|
||||||
|
return
|
||||||
|
|
||||||
filename = '{0}{1}'.format(deck_name, self.exporter.ext)
|
filename = '{0}{1}'.format(deck_name, self.exporter.ext)
|
||||||
while 1:
|
while 1:
|
||||||
file = getSaveFile(self, _("Export"), "export",
|
file = getSaveFile(self, _("Export"), "export",
|
||||||
|
|
Loading…
Reference in a new issue