def OnSlice(self, e):
if self.filename == None:
+ wx.MessageBox('You need to load a file before you can slice 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 = sliceProgessPanel.sliceProgessPanel(self, self, self.filename)
def OnPrint(self, e):
if self.filename == None:
- wx.MessageBox('You need to load a file before you can print it.', 'Print error', wx.OK | wx.ICON_INFORMATION)
+ wx.MessageBox('You need to load a file and slice it before you can print it.', 'Print error', wx.OK | wx.ICON_INFORMATION)
return
if not os.path.exists(self.filename[: self.filename.rfind('.')] + "_export.gcode"):
wx.MessageBox('You need to slice the file to GCode before you can print it.', 'Print error', wx.OK | wx.ICON_INFORMATION)
def OnSlice(self, e):
if self.filename == None:
+ wx.MessageBox('You need to load a file before you can slice it.', 'Print error', wx.OK | wx.ICON_INFORMATION)
return
#save the current profile so we can put it back latter
oldProfile = profile.getGlobalProfileString()
profile.loadGlobalProfileFromString(oldProfile)
def OnPrint(self, e):
- printWindow.printWindow()
+ if self.filename == None:
+ wx.MessageBox('You need to load a file and slice it before you can print it.', 'Print error', wx.OK | wx.ICON_INFORMATION)
+ return
+ if not os.path.exists(self.filename[: self.filename.rfind('.')] + "_export.gcode"):
+ wx.MessageBox('You need to slice the file to GCode before you can print it.', 'Print error', wx.OK | wx.ICON_INFORMATION)
+ return
+ printWindow.printFile(self.filename[: self.filename.rfind('.')] + "_export.gcode")
def OnNormalSwitch(self, e):
from gui import mainWindow