mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 14:32:22 -04:00
display helpful dialog if cloze bad
This commit is contained in:
parent
273bf8c9c6
commit
24b8ddce29
1 changed files with 8 additions and 4 deletions
|
@ -804,13 +804,17 @@ class FactEditor(object):
|
||||||
self.saveFields()
|
self.saveFields()
|
||||||
return
|
return
|
||||||
else:
|
else:
|
||||||
ui.utils.showInfo(_("Next field must be blank."),
|
ui.utils.showInfo(
|
||||||
parent=self.parent)
|
_("Next field must be blank."),
|
||||||
|
help="ClozeDeletion",
|
||||||
|
parent=self.parent)
|
||||||
return
|
return
|
||||||
# check if there's anything to change
|
# check if there's anything to change
|
||||||
if not re.search("\[.+?\]", unicode(src.toPlainText())):
|
if not re.search("\[.+?\]", unicode(src.toPlainText())):
|
||||||
QDesktopServices.openUrl(QUrl(ankiqt.appWiki +
|
ui.utils.showInfo(
|
||||||
"ClozeDeletion"))
|
_("You didn't specify anything to occlude."),
|
||||||
|
help="ClozeDeletion",
|
||||||
|
parent=self.parent)
|
||||||
return
|
return
|
||||||
# create
|
# create
|
||||||
s = unicode(src.toHtml())
|
s = unicode(src.toHtml())
|
||||||
|
|
Loading…
Reference in a new issue