Fixed #52 - Correct error message when trying to print without a model. Fixed #53 - Give an error message when slicing without model loaded.
This commit is contained in:
parent
493dceedc9
commit
af737ef097
2 changed files with 10 additions and 2 deletions
|
@ -274,6 +274,7 @@ class mainWindow(configBase.configWindowBase):
|
||||||
|
|
||||||
def OnSlice(self, e):
|
def OnSlice(self, e):
|
||||||
if self.filename == None:
|
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
|
return
|
||||||
#Create a progress panel and add it to the window. The progress panel will start the Skein operation.
|
#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)
|
spp = sliceProgessPanel.sliceProgessPanel(self, self, self.filename)
|
||||||
|
@ -286,7 +287,7 @@ class mainWindow(configBase.configWindowBase):
|
||||||
|
|
||||||
def OnPrint(self, e):
|
def OnPrint(self, e):
|
||||||
if self.filename == None:
|
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
|
return
|
||||||
if not os.path.exists(self.filename[: self.filename.rfind('.')] + "_export.gcode"):
|
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)
|
wx.MessageBox('You need to slice the file to GCode before you can print it.', 'Print error', wx.OK | wx.ICON_INFORMATION)
|
||||||
|
|
|
@ -164,6 +164,7 @@ class simpleModeWindow(configBase.configWindowBase):
|
||||||
|
|
||||||
def OnSlice(self, e):
|
def OnSlice(self, e):
|
||||||
if self.filename == None:
|
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
|
return
|
||||||
#save the current profile so we can put it back latter
|
#save the current profile so we can put it back latter
|
||||||
oldProfile = profile.getGlobalProfileString()
|
oldProfile = profile.getGlobalProfileString()
|
||||||
|
@ -273,7 +274,13 @@ class simpleModeWindow(configBase.configWindowBase):
|
||||||
profile.loadGlobalProfileFromString(oldProfile)
|
profile.loadGlobalProfileFromString(oldProfile)
|
||||||
|
|
||||||
def OnPrint(self, e):
|
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):
|
def OnNormalSwitch(self, e):
|
||||||
from gui import mainWindow
|
from gui import mainWindow
|
||||||
|
|
Loading…
Reference in a new issue