From 7541485e87f82b788ed144f5a4dfc420cfe1cfba Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 16 May 2009 05:23:09 +0900 Subject: [PATCH] save the cramming check before closing the deck --- ankiqt/ui/main.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ankiqt/ui/main.py b/ankiqt/ui/main.py index 35d23a6a1..f0b863233 100644 --- a/ankiqt/ui/main.py +++ b/ankiqt/ui/main.py @@ -718,8 +718,9 @@ To upgrade an old deck, download Anki 0.9.8.7.""")) def onClose(self): if self.inMainWindow(): - self.saveAndClose(hideWelcome=self.isCramming()) - if self.isCramming(): + isCram = self.isCramming() + self.saveAndClose(hideWelcome=isCram) + if isCram: self.loadRecent(0) else: self.app.activeWindow().close()