From 58935afba7edf27e9cef38daa1ce40833b932f01 Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Tue, 24 Jan 2012 23:38:58 +0900 Subject: [PATCH] when undoing, update daily limits --- anki/collection.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/anki/collection.py b/anki/collection.py index 6c1857a88..a638cfb4f 100644 --- a/anki/collection.py +++ b/anki/collection.py @@ -563,6 +563,10 @@ where c.nid == f.id "select id from revlog where cid = ? " "order by id desc limit 1", c.id) self.db.execute("delete from revlog where id = ?", last) + # and finally, update daily counts + # fixme: what to do in cramming case? + type = ("new", "lrn", "rev")[c.queue] + self.sched._updateStats(c, type, -1) def _markOp(self, name): "Call via .save()"