From: daid303 Date: Fri, 29 Mar 2013 17:39:08 +0000 (+0100) Subject: Fix some issues with the window position code. X-Git-Tag: 13.05~64^2~14 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=97716443eddaa816daef29b760a8907d90a090fd;p=cura.git Fix some issues with the window position code. --- 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)