chiark / gitweb /
Fix the simplemode.
authordaid303 <daid303@gmail.com>
Mon, 10 Dec 2012 13:35:47 +0000 (14:35 +0100)
committerdaid303 <daid303@gmail.com>
Mon, 10 Dec 2012 13:35:47 +0000 (14:35 +0100)
Cura/gui/mainWindow.py
Cura/gui/simpleMode.py

index 1dbff0b280952b7a939b6b2eab056fa8a8152dcd..6e723fd06a1c5194e24cab5bf7e1a5151dc8d655 100644 (file)
@@ -262,6 +262,11 @@ class mainWindow(wx.Frame):
                if len(self.filelist) < 1:
                        wx.MessageBox('You need to load a file before you can prepare it.', 'Print error', wx.OK | wx.ICON_INFORMATION)
                        return
+               isSimple = profile.getPreference('startMode') == 'Simple'
+               if isSimple:
+                       #save the current profile so we can put it back latter
+                       oldProfile = profile.getGlobalProfileString()
+                       self.simpleSettingsPanel.setupSlice()
                #Create a progress panel and add it to the window. The progress panel will start the Skein operation.
                spp = sliceProgessPanel.sliceProgessPanel(self, self, self.filelist)
                self.sizer.Add(spp, (len(self.progressPanelList)+2,0), span=(1, 4 + self.extruderCount), flag=wx.EXPAND)
@@ -271,6 +276,8 @@ class mainWindow(wx.Frame):
                if newSize.GetWidth() < wx.GetDisplaySize()[0]:
                        self.SetSize(newSize)
                self.progressPanelList.append(spp)
+               if isSimple:
+                       profile.loadGlobalProfileFromString(oldProfile)
 
        def OnPrint(self, e):
                if len(self.filelist) < 1:
index 56f8057d1f877372039d9e9814a646f7f8b5788a..04400524ea6c40337b9575f0e283ddb27d76f642 100644 (file)
@@ -59,9 +59,6 @@ class simpleModePanel(wx.Panel):
                self.printMaterialPLA.SetValue(True)
 
        def setupSlice(self):
-               #save the current profile so we can put it back latter
-               oldProfile = profile.getGlobalProfileString()
-               
                put = profile.putProfileSetting
                get = profile.getProfileSetting
 
@@ -159,8 +156,3 @@ class simpleModePanel(wx.Panel):
 
        def updateProfileToControls(self):
                pass
-
-#      def OnNormalSwitch(self, e):
-#              profile.putPreference('startMode', 'Normal')
-#              mainWindow.mainWindow()
-#              self.Close()