From a803f4afeeb9d5a9995cd067679fe8db180b60f0 Mon Sep 17 00:00:00 2001 From: Lovac42 Date: Fri, 17 May 2019 20:17:36 -0400 Subject: [PATCH] added runHooks for reverted cards and state. --- aqt/main.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/aqt/main.py b/aqt/main.py index 58acc57d0..ab1eb23d0 100644 --- a/aqt/main.py +++ b/aqt/main.py @@ -817,11 +817,11 @@ QTreeWidget { self.col.sched.reset() self.reviewer.cardQueue.append(card) self.reviewer.nextCard() - self.maybeEnableUndo() - return - - tooltip(_("Reverted to state prior to '%s'.") % n.lower()) - self.reset() + runHook("revertedCard", cid) + else: + self.reset() + tooltip(_("Reverted to state prior to '%s'.") % n.lower()) + runHook("revertedState", n) self.maybeEnableUndo() def maybeEnableUndo(self):