commit a378922c058784007ce7b627df9f72b0bba4c341
parent bb20d618dff6477969539f702420f456b821634d
Author: ThomasV <thomasv@gitorious>
Date: Thu, 22 Jan 2015 16:29:33 +0100
more robust winpos-qt
Diffstat:
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/gui/qt/main_window.py b/gui/qt/main_window.py
@@ -144,8 +144,11 @@ class ElectrumWindow(QMainWindow):
tabs.setSizePolicy(QSizePolicy.Expanding, QSizePolicy.Expanding)
self.setCentralWidget(tabs)
- g = self.config.get("winpos-qt",[100, 100, 840, 400])
- self.setGeometry(g[0], g[1], g[2], g[3])
+ try:
+ self.setGeometry(*self.config.get("winpos-qt"))
+ except:
+ self.setGeometry(100, 100, 840, 400)
+
if self.config.get("is_maximized"):
self.showMaximized()