From da18e4be26f1d339356a34b4226e235a38dc57c2 Mon Sep 17 00:00:00 2001 From: mailchuck Date: Sat, 14 Nov 2015 21:07:46 +0100 Subject: [PATCH] Move saving UI state quit is more appropriate than close event, but it my resurrect the issue with linux saving config data. --- src/bitmessageqt/__init__.py | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/src/bitmessageqt/__init__.py b/src/bitmessageqt/__init__.py index 06b56605..9ac08d46 100644 --- a/src/bitmessageqt/__init__.py +++ b/src/bitmessageqt/__init__.py @@ -2862,6 +2862,14 @@ class MyForm(settingsmixin.SMainWindow): if reply is QtGui.QMessageBox.No: return ''' + # save state and geometry self and all widgets + self.saveSettings() + for attr, obj in self.ui.__dict__.iteritems(): + if hasattr(obj, "__class__") and isinstance(obj, settingsmixin.SettingsMixin): + saveMethod = getattr(obj, "saveSettings", None) + if callable (saveMethod): + obj.saveSettings() + shared.doCleanShutdown() self.tray.hide() # unregister the messaging system @@ -2891,13 +2899,6 @@ class MyForm(settingsmixin.SMainWindow): # minimize the application event.ignore() else: - # save state and geometry self and all widgets - self.saveSettings() - for attr, obj in self.ui.__dict__.iteritems(): - if hasattr(obj, "__class__") and isinstance(obj, settingsmixin.SettingsMixin): - saveMethod = getattr(obj, "saveSettings", None) - if callable (saveMethod): - obj.saveSettings() # quit the application event.accept() self.quit()