From d87d48eff9a82d8d415313b47f5de2f0c0a8e216 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 13 Mar 2009 06:13:56 +0900 Subject: [PATCH] don't add extra
when in final drill --- ankiqt/ui/view.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/ankiqt/ui/view.py b/ankiqt/ui/view.py index 17555f1f1..6a1802dd5 100644 --- a/ankiqt/ui/view.py +++ b/ankiqt/ui/view.py @@ -56,7 +56,7 @@ class View(object): self.haveTop = (self.main.lastCard and ( self.main.config['showLastCardContent'] or self.main.config['showLastCardInterval'])) or ( - self.main.currentCard and self.main.currentCard.due > time.time()) + self.needFutureWarning()) self.drawRule = (self.main.config['qaDivider'] and self.main.currentCard and not self.main.currentCard.cardModel.questionInAnswer) @@ -204,13 +204,18 @@ class View(object): self.drawLastCard() self.buffer += "" - def drawFutureWarning(self): + def needFutureWarning(self): if not self.main.currentCard: return if self.main.currentCard.due <= time.time(): return if self.main.currentCard.due - time.time() <= self.main.deck.delay0: return + return True + + def drawFutureWarning(self): + if not self.needFutureWarning(): + return self.write("" % futureWarningColour + _("This card was due in %s.") % fmtTimeSpan( self.main.currentCard.due - time.time()) +