From 9ba1fdda453a1028822834467748953658a0b02a Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 13 Mar 2015 10:42:37 +0530 Subject: [PATCH] Do not save state twice during editor shutdown --- src/calibre/gui2/tweak_book/boss.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/calibre/gui2/tweak_book/boss.py b/src/calibre/gui2/tweak_book/boss.py index f0d163f721..442a487025 100644 --- a/src/calibre/gui2/tweak_book/boss.py +++ b/src/calibre/gui2/tweak_book/boss.py @@ -1387,7 +1387,6 @@ class Boss(QObject): if not self.confirm_quit(): return False - self.save_state() self.shutdown() QApplication.instance().quit() return True @@ -1445,11 +1444,11 @@ class Boss(QObject): QApplication.instance().quit() def shutdown(self): + self.save_state() completion_worker().shutdown() self.save_manager.check_for_completion.disconnect() self.gui.preview.stop_refresh_timer() self.gui.live_css.stop_update_timer() - self.save_state() [x.reject() for x in _diff_dialogs] del _diff_dialogs[:] self.save_manager.shutdown()