From d504e754b03cd48e882c8b6449da43229c67094c Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Fri, 18 Feb 2011 13:54:06 +0900 Subject: [PATCH] spaced check is expensive, don't do it in status, and don't redraw on init --- ankiqt/ui/status.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/ankiqt/ui/status.py b/ankiqt/ui/status.py index 1e303ce60..1ff8282a4 100644 --- a/ankiqt/ui/status.py +++ b/ankiqt/ui/status.py @@ -137,7 +137,6 @@ class StatusView(object): self.timer = QClickableLabel() self.timer.setText("00:00") self.addWidget(self.timer) - self.redraw() def addWidget(self, w, stretch=0): self.statusbar.addWidget(w, stretch) @@ -188,7 +187,6 @@ class StatusView(object): new = stats['new'] stats['new1'] = '%s' % new self.remText.setText(remStr % stats) - stats['spaced'] = self.main.deck.spacedCardCount() stats['new2'] = self.main.deck.newCount self.remText.setToolTip("

" +_( "Remaining cards") + "

" + @@ -203,10 +201,7 @@ class StatusView(object): stats['new']) % stats['new'] + "

" + ngettext("There is %d new card in total.", \ "There are %d new cards in total.",\ - stats['new2']) % stats['new2'] + "
" + - ngettext("There is %d delayed card.", \ - "There are %d delayed cards.", \ - stats['spaced']) % stats['spaced']) + stats['new2']) % stats['new2']) # eta self.etaText.setText(_("ETA: %(timeLeft)s") % stats) # retention & progress bars