add tooltip on undo rollback

This commit is contained in:
Damien Elmes 2012-12-22 07:42:52 +09:00
parent e27cbd2cb7
commit a35ce1fd8e

View file

@ -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()