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() 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())