From 40227a815475b342cf02d32e1ee44c1d71878721 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 5ec23fe5..9e37de5b 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -203,16 +203,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