ensure the same card appears after an undo

This commit is contained in:
Damien Elmes 2012-02-13 12:50:44 +09:00
parent a729b8408b
commit 7be3935c02
2 changed files with 5 additions and 1 deletions

View file

@ -628,7 +628,10 @@ Debug info:\n%s""") % traceback.format_exc(), help="DeckErrors")
##########################################################################
def onUndo(self):
self.col.undo()
cid = self.col.undo()
if cid:
card = self.col.getCard(cid)
self.reviewer.cardQueue.append(card)
self.reset()
self.maybeEnableUndo()

View file

@ -52,6 +52,7 @@ class Reviewer(object):
if self.cardQueue:
# undone/edited cards to show
c = self.cardQueue.pop()
c.startTimer()
self.hadCardQueue = True
else:
if self.hadCardQueue: