From: Daid Date: Fri, 29 Mar 2013 16:04:29 +0000 (+0100) Subject: Fix the splitter sizing issue on mac. X-Git-Tag: 13.05~64^2~16 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=36c29152e5eddd5fafae651bc35acddb0fc78f2f;p=cura.git Fix the splitter sizing issue on mac. --- diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 00282071..1c143f61 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -207,7 +207,6 @@ class mainWindow(wx.Frame): self.Centre() # Restore the window position, size & state from the preferences file - self.normalSashPos = 320 try: if profile.getPreference('window_maximized') == 'True': self.Maximize(True) @@ -222,6 +221,8 @@ class mainWindow(wx.Frame): 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.Maximize(True) @@ -264,7 +265,6 @@ class mainWindow(wx.Frame): self.splitter.SetSashSize(0) else: self.splitter.SetSashPosition(self.normalSashPos, True) - # Enabled sash self.splitter.SetSashSize(4) @@ -678,6 +678,10 @@ class normalSettingsPanel(configBase.configPanelBase): self.Bind(wx.EVT_SIZE, self.OnSize) + self.nb.SetSize(self.GetSize()) + self.UpdateSize(self.printPanel) + self.UpdateSize(self.advancedPanel) + def SizeLabelWidths(self, left, right): leftWidth = self.getLabelColumnWidth(left) rightWidth = self.getLabelColumnWidth(right) @@ -729,7 +733,7 @@ class normalSettingsPanel(configBase.configPanelBase): self.Layout() configPanel.Thaw() else: - if colSize1[0] > (colBestSize1[0] + colBestSize2[0]): + if max(colSize1[0], colSize2[0]) > (colBestSize1[0] + colBestSize2[0]): configPanel.Freeze() sizer = wx.BoxSizer(wx.HORIZONTAL) sizer.Add(configPanel.leftPanel, proportion=1, border=35, flag=wx.EXPAND) @@ -739,7 +743,7 @@ class normalSettingsPanel(configBase.configPanelBase): configPanel.Layout() self.Layout() configPanel.Thaw() - + def updateProfileToControls(self): super(normalSettingsPanel, self).updateProfileToControls() self.alterationPanel.updateProfileToControls() diff --git a/Cura/slice/__main__.py b/Cura/slice/__main__.py index 80a1489e..6c020577 100644 --- a/Cura/slice/__main__.py +++ b/Cura/slice/__main__.py @@ -81,6 +81,7 @@ def main(): if extruderNr > 0: if profile.getProfileSettingFloat('filament_diameter%d' % (extruderNr + 1)) > 0: profile.setTempOverride('filament_diameter', profile.getProfileSetting('filament_diameter%d' % (extruderNr + 1))) + print extruderNr, profile.getPreferenceFloat('extruder_offset_x%d' % (extruderNr)), profile.getPreferenceFloat('extruder_offset_y%d' % (extruderNr)) output.append(export.getOutput(filename)) profile.resetTempOverride() if len(output) == 1: diff --git a/Cura/util/profile.py b/Cura/util/profile.py index 8fee0b17..a8e3e26f 100644 --- a/Cura/util/profile.py +++ b/Cura/util/profile.py @@ -200,7 +200,7 @@ preferencesDefaultSettings = { 'window_pos_y': '-1', 'window_width': '-1', 'window_height': '-1', - 'window_normal_sash': '320', + 'window_normal_sash': '0', } #########################################################