Commit 51f59b06 authored by kliment's avatar kliment

Fix crash on new gcode file load if no previous file was loaded

parent 72c68030
......@@ -61,8 +61,10 @@ class gviz(wx.Panel):
self.layerindex=0
self.showall=0
self.dirty=1
self.blitmap=wx.EmptyBitmap(self.GetClientSize()[0],self.GetClientSize()[1],-1)
self.repaint()
def layerup(self):
if(self.layerindex+1<len(self.layers)):
self.layerindex+=1
......@@ -173,7 +175,8 @@ class gviz(wx.Panel):
if __name__ == '__main__':
app = wx.App(False)
main = window(open("/home/kliment/designs/spinner/gearend_export.gcode"))
#main = window(open("/home/kliment/designs/spinner/gearend_export.gcode"))
main = window(open("jam.gcode"))
main.Show()
app.MainLoop()
......@@ -642,7 +642,7 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
return
path = os.path.split(name)[0]
if path != self.settings.last_file_path:
self.set("last_file_path",path)
self.set("last_file_path",path)
if name.lower().endswith(".stl"):
self.skein(name)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment