mirror of
https://github.com/ankitects/anki.git
synced 2025-09-22 16:02:23 -04:00
ensure the same card appears after an undo
This commit is contained in:
parent
a729b8408b
commit
7be3935c02
2 changed files with 5 additions and 1 deletions
|
@ -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()
|
||||
|
||||
|
|
|
@ -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:
|
||||
|
|
Loading…
Reference in a new issue