Merge pull request #309 from lovac42/reverted_info

added runHooks for reverted cards and state.
This commit is contained in:
Damien Elmes 2019-05-20 15:03:28 +10:00 committed by GitHub
commit e2791d812f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -817,11 +817,11 @@ QTreeWidget {
self.col.sched.reset() self.col.sched.reset()
self.reviewer.cardQueue.append(card) self.reviewer.cardQueue.append(card)
self.reviewer.nextCard() self.reviewer.nextCard()
self.maybeEnableUndo() runHook("revertedCard", cid)
return else:
self.reset()
tooltip(_("Reverted to state prior to '%s'.") % n.lower()) tooltip(_("Reverted to state prior to '%s'.") % n.lower())
self.reset() runHook("revertedState", n)
self.maybeEnableUndo() self.maybeEnableUndo()
def maybeEnableUndo(self): def maybeEnableUndo(self):