display helpful dialog if cloze bad

This commit is contained in:
Damien Elmes 2009-09-26 23:23:41 +09:00
parent 273bf8c9c6
commit 24b8ddce29

View file

@ -804,13 +804,17 @@ class FactEditor(object):
self.saveFields()
return
else:
ui.utils.showInfo(_("Next field must be blank."),
ui.utils.showInfo(
_("Next field must be blank."),
help="ClozeDeletion",
parent=self.parent)
return
# check if there's anything to change
if not re.search("\[.+?\]", unicode(src.toPlainText())):
QDesktopServices.openUrl(QUrl(ankiqt.appWiki +
"ClozeDeletion"))
ui.utils.showInfo(
_("You didn't specify anything to occlude."),
help="ClozeDeletion",
parent=self.parent)
return
# create
s = unicode(src.toHtml())