chiark / gitweb /
Remove the load/prepare/print buttons from the bottom as they are in the 3D window...
authordaid303 <daid303@gmail.com>
Wed, 6 Feb 2013 09:44:38 +0000 (10:44 +0100)
committerdaid303 <daid303@gmail.com>
Wed, 6 Feb 2013 09:44:38 +0000 (10:44 +0100)
Cura/cura.py
Cura/gui/mainWindow.py
Cura/gui/preview3d.py

index 07b901c1c9b4999d055fe7334f303a253b47118a..8474a661fdded4430d4b03b069f7bb71a55d4de7 100644 (file)
@@ -69,6 +69,8 @@ def main():
                #Place any unused arguments as last file, so Cura starts with opening those files.
                if len(args) > 0:
                        profile.putPreference('lastFile', ';'.join(args))
+                       profile.putProfileSetting('model_matrix', '1,0,0,0,1,0,0,0,1')
+                       profile.setPluginConfig([])
 
                #Do not import anything from Cura.gui before this spot, as the above code also needs to run in pypy.
                from Cura.gui import app
index fe9307c7fc5a05cda511c481da01e0fa1f92825a..47aaef714dec10333419c559f5751723e43cdf0d 100644 (file)
@@ -173,42 +173,13 @@ class mainWindow(wx.Frame):
                #Preview window
                self.preview3d = preview3d.previewPanel(self.rightPane)
 
-               # load and slice buttons.
-               loadButton = wx.Button(self.rightPane, -1, '&Load model')
-               sliceButton = wx.Button(self.rightPane, -1, 'P&repare print')
-               printButton = wx.Button(self.rightPane, -1, '&Print')
-               self.Bind(wx.EVT_BUTTON, lambda e: self._showModelLoadDialog(1), loadButton)
-               self.Bind(wx.EVT_BUTTON, self.OnSlice, sliceButton)
-               self.Bind(wx.EVT_BUTTON, self.OnPrint, printButton)
-
-               if self.extruderCount > 1:
-                       loadButton2 = wx.Button(self.rightPane, -1, 'Load Dual')
-                       self.Bind(wx.EVT_BUTTON, lambda e: self._showModelLoadDialog(2), loadButton2)
-               if self.extruderCount > 2:
-                       loadButton3 = wx.Button(self.rightPane, -1, 'Load Triple')
-                       self.Bind(wx.EVT_BUTTON, lambda e: self._showModelLoadDialog(3), loadButton3)
-               if self.extruderCount > 3:
-                       loadButton4 = wx.Button(self.rightPane, -1, 'Load Quad')
-                       self.Bind(wx.EVT_BUTTON, lambda e: self._showModelLoadDialog(4), loadButton4)
-
                #Also bind double clicking the 3D preview to load an STL file.
                #self.preview3d.glCanvas.Bind(wx.EVT_LEFT_DCLICK, lambda e: self._showModelLoadDialog(1), self.preview3d.glCanvas)
 
                #Main sizer, to position the preview window, buttons and tab control
-               sizer = wx.GridBagSizer()
+               sizer = wx.BoxSizer()
                self.rightPane.SetSizer(sizer)
-               sizer.Add(self.preview3d, (0,1), span=(1,2+self.extruderCount), flag=wx.EXPAND)
-               sizer.AddGrowableCol(2 + self.extruderCount)
-               sizer.AddGrowableRow(0)
-               sizer.Add(loadButton, (1,1), flag=wx.RIGHT|wx.BOTTOM|wx.TOP, border=5)
-               if self.extruderCount > 1:
-                       sizer.Add(loadButton2, (1,2), flag=wx.RIGHT|wx.BOTTOM|wx.TOP, border=5)
-               if self.extruderCount > 2:
-                       sizer.Add(loadButton3, (1,3), flag=wx.RIGHT|wx.BOTTOM|wx.TOP, border=5)
-               if self.extruderCount > 3:
-                       sizer.Add(loadButton4, (1,4), flag=wx.RIGHT|wx.BOTTOM|wx.TOP, border=5)
-               sizer.Add(sliceButton, (1,1+self.extruderCount), flag=wx.RIGHT|wx.BOTTOM|wx.TOP, border=5)
-               sizer.Add(printButton, (1,2+self.extruderCount), flag=wx.RIGHT|wx.BOTTOM|wx.TOP, border=5)              
+               sizer.Add(self.preview3d, 1, flag=wx.EXPAND)
 
                # Main window sizer
                sizer = wx.BoxSizer(wx.VERTICAL)
index f51b2cabab8c07ad7f3ad38d602ba151b9f69d23..9edc4b664ff198aa3e6729760e77afd5879ce296 100644 (file)
@@ -119,6 +119,14 @@ class previewPanel(wx.Panel):
                self.sliceButton         = openglGui.glButton(self.glCanvas, 6, 'Prepare model', (0,-2), lambda : self.GetParent().GetParent().GetParent().OnSlice(None))
                self.printButton         = openglGui.glButton(self.glCanvas, 7, 'Print model', (0,-1), lambda : self.GetParent().GetParent().GetParent().OnPrint(None))
 
+               extruderCount = int(profile.getPreference('extruder_amount'))
+               if extruderCount > 1:
+                       openglGui.glButton(self.glCanvas, 3, 'Load dual model', (1,0), lambda : self.GetParent().GetParent().GetParent()._showModelLoadDialog(2))
+               if extruderCount > 2:
+                       openglGui.glButton(self.glCanvas, 3, 'Load triple model', (2,0), lambda : self.GetParent().GetParent().GetParent()._showModelLoadDialog(3))
+               if extruderCount > 3:
+                       openglGui.glButton(self.glCanvas, 3, 'Load quad model', (3,0), lambda : self.GetParent().GetParent().GetParent()._showModelLoadDialog(4))
+
                self.scaleForm = openglGui.glFrame(self.glCanvas, (1, 3))
                openglGui.glGuiLayoutGrid(self.scaleForm)
                openglGui.glLabel(self.scaleForm, 'Scale X', (0,0))