when user tries to cloze a normal note type, show help

This commit is contained in:
Damien Elmes 2012-04-06 16:56:36 +09:00
parent a9a0b1752d
commit 2107c1a9c0

View file

@ -608,8 +608,7 @@ class Editor(object):
def onCloze(self): def onCloze(self):
# check that the model is set up for cloze deletion # check that the model is set up for cloze deletion
if 'cloze' not in self.note.model()['tmpls'][0]['qfmt']: if 'cloze' not in self.note.model()['tmpls'][0]['qfmt']:
showInfo(_("Cloze deletion requires a Cloze note type."), openHelp("cloze")
help="ClozeDeletion")
return return
f = self.note.fields[self.currentField] f = self.note.fields[self.currentField]
# find the highest existing cloze # find the highest existing cloze