display warning when card has empty front

This commit is contained in:
Damien Elmes 2012-05-06 19:00:39 +09:00
parent a878a5c7b4
commit ef60eb4bba

View file

@ -167,7 +167,11 @@ function _typeAnsPress() {
self.typedAnswer = None self.typedAnswer = None
c = self.card c = self.card
# grab the question and play audio # grab the question and play audio
q = c.q() if c.isEmpty():
q = _("""\
The front of this card is empty. Please run Tools>Maintenance>Empty Cards.""")
else:
q = c.q()
if self._autoplay(c): if self._autoplay(c):
playFromText(q) playFromText(q)
# render & update bottom # render & update bottom