From b5c8ba7b9f1d742569fadbb1a9537c7e341383f4 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Wed, 30 Mar 2011 20:52:38 +0900 Subject: [PATCH] apply selective to card/fact counts --- anki/graphs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/anki/graphs.py b/anki/graphs.py index 7736df7e5..00678f4d8 100644 --- a/anki/graphs.py +++ b/anki/graphs.py @@ -358,8 +358,11 @@ order by thetype, ease""" % lim) d.append(dict(data=div[c], label=t, color=col)) # text data i = [] - self._line(i, _("Total Cards"), self.deck.cardCount()) - self._line(i, _("Total Facts"), self.deck.factCount()) + (c, f) = self.deck.db.first(""" +select count(id), count(distinct fid) from cards +where 1 """ + self._limit()) + self._line(i, _("Total Cards"), c) + self._line(i, _("Total Facts"), f) (low, avg, high) = self._factors() self._line(i, _("Lowest ease factor"), "%d%%" % low) self._line(i, _("Average ease factor"), "%d%%" % avg)