Skip to content

Commit

Permalink
Fix some issues with the window position code.
Browse files Browse the repository at this point in the history
  • Loading branch information
daid committed Mar 29, 2013
1 parent 2f6afbe commit 9771644
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions Cura/gui/mainWindow.py
Expand Up @@ -215,16 +215,17 @@ def __init__(self):
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)

Expand Down

0 comments on commit 9771644

Please sign in to comment.