Autoload file and enable print after skeining

master
kliment 2011-07-15 12:11:09 +02:00
parent 655ab135e5
commit 71dfcf141e
1 changed files with 4 additions and 0 deletions

View File

@ -631,7 +631,11 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
try:
self.filename=self.filename.replace(".stl","_export.gcode")
self.f=[i.replace("\n","").replace("\r","") for i in open(self.filename)]
if self.p.online:
wx.CallAfter(self.printbtn.Enable)
wx.CallAfter(self.status.SetStatusText,"Loaded "+self.filename+", %d lines"%(len(self.f),))
threading.Thread(target=self.loadviz).start()
except:
self.filename=fn