Fix the simplemode.

master
daid303 2012-12-10 14:35:47 +01:00
parent 9bba87387e
commit 91a592d922
2 changed files with 7 additions and 8 deletions

View 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:

View 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()