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,6 +167,10 @@ 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
if c.isEmpty():
q = _("""\
The front of this card is empty. Please run Tools>Maintenance>Empty Cards.""")
else:
q = c.q() q = c.q()
if self._autoplay(c): if self._autoplay(c):
playFromText(q) playFromText(q)