chiark / gitweb /
Fix some issues with the window position code.
authordaid303 <daid303@gmail.com>
Fri, 29 Mar 2013 17:39:08 +0000 (18:39 +0100)
committerdaid303 <daid303@gmail.com>
Fri, 29 Mar 2013 17:39:50 +0000 (18:39 +0100)
Cura/gui/mainWindow.py

index de4196dc51ad1673d78a5d5e3b832b912accac1d..78a49943da16360ff0f2ff5f1a2336bf06672029 100644 (file)
@@ -215,16 +215,17 @@ class mainWindow(wx.Frame):
                                posy = int(profile.getPreference('window_pos_y'))
                                width = int(profile.getPreference('window_width'))
                                height = int(profile.getPreference('window_height'))
-                       if posx > 0 or posy > 0:
-                               self.SetPosition((posx,posy))
-                       if width > 0 and height > 0:
-                               self.SetSize((width,height))
+                               if posx > 0 or posy > 0:
+                                       self.SetPosition((posx,posy))
+                               if width > 0 and height > 0:
+                                       self.SetSize((width,height))
                                
                        self.normalSashPos = int(profile.getPreference('window_normal_sash'))
-                       if self.normalSashPos < self.normalSettingsPanel.printPanel.GetBestSize()[0] + 5:
-                               self.normalSashPos = self.normalSettingsPanel.printPanel.GetBestSize()[0] + 5
                except:
+                       self.normalSashPos = 0
                        self.Maximize(True)
+               if self.normalSashPos < self.normalSettingsPanel.printPanel.GetBestSize()[0] + 5:
+                       self.normalSashPos = self.normalSettingsPanel.printPanel.GetBestSize()[0] + 5
 
                self.splitter.SplitVertically(self.leftPane, self.rightPane, self.normalSashPos)