Exemple #1
0
	def OnSlice(self, e):
		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
			
		#Create a progress panel and add it to the window. The progress panel will start the Skein operation.
		spp = sliceProgressPanel.sliceProgressPanel(self, self, self.filelist)
		self.sizer.Add(spp, 0, flag=wx.EXPAND)
		self.sizer.Layout()
		newSize = self.GetSize()
		newSize.IncBy(0, spp.GetSize().GetHeight())
		if newSize.GetWidth() < wx.GetDisplaySize()[0]:
			self.SetSize(newSize)
		self.progressPanelList.append(spp)
Exemple #2
0
	def OnSlice(self, e):
		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 = sliceProgressPanel.sliceProgressPanel(self, self, self.filelist)
		self.sizer.Add(spp, 0, flag=wx.EXPAND)
		self.sizer.Layout()
		newSize = self.GetSize()
		newSize.IncBy(0, spp.GetSize().GetHeight())
		if newSize.GetWidth() < wx.GetDisplaySize()[0]:
			self.SetSize(newSize)
		self.progressPanelList.append(spp)
		if isSimple:
			profile.loadGlobalProfileFromString(oldProfile)
Exemple #3
0
 def OnSlice(self, e):
     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 = sliceProgressPanel.sliceProgressPanel(self, self, self.filelist)
     self.sizer.Add(spp, 0, flag=wx.EXPAND)
     self.sizer.Layout()
     newSize = self.GetSize()
     newSize.IncBy(0, spp.GetSize().GetHeight())
     if newSize.GetWidth() < wx.GetDisplaySize()[0]:
         self.SetSize(newSize)
     self.progressPanelList.append(spp)
     if isSimple:
         profile.loadGlobalProfileFromString(oldProfile)