From: Youness Alaoui Date: Fri, 31 Jul 2015 18:17:03 +0000 (-0400) Subject: Fix simple mode panel being the wrong size X-Git-Tag: lulzbot-15.02.1-2.01~55^2~2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=107b04f9391d44ae4dc09d330e3dde697e4d5007;p=cura.git Fix simple mode panel being the wrong size --- diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 87b1ffc8..23a0ab8e 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -203,6 +203,7 @@ class mainWindow(wx.Frame): self.SetMenuBar(self.menubar) self.splitter = wx.SplitterWindow(self, style = wx.SP_3D | wx.SP_LIVE_UPDATE) + self.splitter.SetMinimumPaneSize(100) self.leftPane = wx.Panel(self.splitter, style=wx.BORDER_NONE) self.rightPane = wx.Panel(self.splitter, style=wx.BORDER_NONE) self.splitter.Bind(wx.EVT_SPLITTER_DCLICK, lambda evt: evt.Veto()) @@ -279,7 +280,7 @@ class mainWindow(wx.Frame): self.SetSize((800,600)) self.Centre() - self.updateSliceMode() + self.updateSliceMode(False) self.scene.SetFocus() self.dialogframe = None if Publisher is not None: @@ -376,8 +377,13 @@ class mainWindow(wx.Frame): self.normalSashPos = self.splitter.GetSashPosition() # Change location of sash to width of quick mode pane + self.simpleSettingsPanel.Layout() + self.simpleSettingsPanel.Fit() (width, height) = self.simpleSettingsPanel.GetSizer().GetSize() - self.splitter.SetSashPosition(width, True) + if width > 0: + self.splitter.SetSashPosition(width, True) + else: + self.splitter.SizeWindows() # Disable sash self.splitter.SetSashSize(0) @@ -385,6 +391,7 @@ class mainWindow(wx.Frame): # Only change the sash position if we changed mode from simple if changedMode: self.splitter.SetSashPosition(self.normalSashPos, True) + # Enabled sash self.splitter.SetSashSize(4) self.defaultFirmwareInstallMenuItem.Enable(firmwareInstall.getDefaultFirmware() is not None)