From 91a592d92201104cdccc99adb20563dcabbe44be Mon Sep 17 00:00:00 2001 From: daid303 Date: Mon, 10 Dec 2012 14:35:47 +0100 Subject: [PATCH] Fix the simplemode. --- Cura/gui/mainWindow.py | 7 +++++++ Cura/gui/simpleMode.py | 8 -------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/Cura/gui/mainWindow.py b/Cura/gui/mainWindow.py index 1dbff0b2..6e723fd0 100644 --- a/Cura/gui/mainWindow.py +++ b/Cura/gui/mainWindow.py @@ -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: diff --git a/Cura/gui/simpleMode.py b/Cura/gui/simpleMode.py index 56f8057d..04400524 100644 --- a/Cura/gui/simpleMode.py +++ b/Cura/gui/simpleMode.py @@ -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() -- 2.30.2