From 97716443eddaa816daef29b760a8907d90a090fd Mon Sep 17 00:00:00 2001 From: daid303 Date: Fri, 29 Mar 2013 18:39:08 +0100 Subject: [PATCH] Fix some issues with the window position code. --- Cura/gui/mainWindow.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index de4196dc..78a49943 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -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) -- 2.30.2