mirror of
https://github.com/ankitects/anki.git
synced 2025-09-24 16:56:36 -04:00
add tooltip on undo rollback
This commit is contained in:
parent
e27cbd2cb7
commit
a35ce1fd8e
1 changed files with 3 additions and 0 deletions
|
@ -623,10 +623,13 @@ upload, overwriting any changes either here or on AnkiWeb. Proceed?""")):
|
|||
##########################################################################
|
||||
|
||||
def onUndo(self):
|
||||
n = self.col.undoName()
|
||||
cid = self.col.undo()
|
||||
if cid and self.state == "review":
|
||||
card = self.col.getCard(cid)
|
||||
self.reviewer.cardQueue.append(card)
|
||||
else:
|
||||
tooltip(_("Reverted to state prior to '%s'.") % n.lower())
|
||||
self.reset()
|
||||
self.maybeEnableUndo()
|
||||
|
||||
|
|
Loading…
Reference in a new issue