mirror of
https://github.com/ankitects/anki.git
synced 2025-09-23 16:26:40 -04:00
warn when cram deck empty
This commit is contained in:
parent
eb491a7a55
commit
bf64e67913
1 changed files with 6 additions and 2 deletions
|
@ -5,7 +5,7 @@
|
||||||
from aqt.qt import *
|
from aqt.qt import *
|
||||||
import aqt
|
import aqt
|
||||||
from anki.utils import ids2str
|
from anki.utils import ids2str
|
||||||
from aqt.utils import showInfo, showWarning, openHelp, getOnlyText
|
from aqt.utils import showInfo, showWarning, openHelp, getOnlyText, askUser
|
||||||
from operator import itemgetter
|
from operator import itemgetter
|
||||||
|
|
||||||
class DeckConf(QDialog):
|
class DeckConf(QDialog):
|
||||||
|
@ -116,7 +116,11 @@ class DeckConf(QDialog):
|
||||||
def accept(self):
|
def accept(self):
|
||||||
if not self.saveConf():
|
if not self.saveConf():
|
||||||
return
|
return
|
||||||
self.mw.col.sched.rebuildDyn()
|
if not self.mw.col.sched.rebuildDyn():
|
||||||
|
if askUser(_("""\
|
||||||
|
The provided search did not match any cards. Would you like to revise \
|
||||||
|
it?""")):
|
||||||
|
return
|
||||||
self.mw.reset()
|
self.mw.reset()
|
||||||
QDialog.accept(self)
|
QDialog.accept(self)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue