commit 55494e42241a92828050d770fcf3b6377d246060
parent 3f2c906ace3d94ab2db22f18bf66ea5aacbd343a
Author: ThomasV <thomasv@electrum.org>
Date: Mon, 2 Nov 2015 15:53:31 +0100
save window geometry in wallet file, since the GUI can open several windows
Diffstat:
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -139,11 +139,6 @@ class ElectrumWindow(QMainWindow, PrintError):
tabs.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.setCentralWidget(tabs)
- try:
- self.setGeometry(*self.config.get("winpos-qt"))
- except:
- self.setGeometry(100, 100, 840, 400)
-
if self.config.get("is_maximized"):
self.showMaximized()
@@ -270,6 +265,11 @@ class ElectrumWindow(QMainWindow, PrintError):
self.clear_receive_tab()
self.receive_list.update()
self.tabs.show()
+ # set geometry
+ try:
+ self.setGeometry(*self.wallet.storage.get("winpos-qt"))
+ except:
+ self.setGeometry(100, 100, 840, 400)
self.show()
if self.wallet.is_watching_only():
msg = ' '.join([
@@ -2802,7 +2802,7 @@ class ElectrumWindow(QMainWindow, PrintError):
self.config.set_key("is_maximized", self.isMaximized())
if not self.isMaximized():
g = self.geometry()
- self.config.set_key("winpos-qt", [g.left(),g.top(),g.width(),g.height()])
+ self.wallet.storage.put("winpos-qt", [g.left(),g.top(),g.width(),g.height()])
self.config.set_key("console-history", self.console.history[-50:], True)
if self.qr_window:
self.qr_window.close()