Patching do_load so that it updates the pronterface ui when the load command is used within pronterface
Conflicts: pronterface.pymaster
parent
b8f63cd17e
commit
ef6ffecfd4
|
@ -621,6 +621,9 @@ class pronsole(cmd.Cmd):
|
||||||
print "Disconnects from the printer"
|
print "Disconnects from the printer"
|
||||||
|
|
||||||
def do_load(self,l):
|
def do_load(self,l):
|
||||||
|
self._do_load(l)
|
||||||
|
|
||||||
|
def _do_load(self,l):
|
||||||
if len(l)==0:
|
if len(l)==0:
|
||||||
print "No file name given."
|
print "No file name given."
|
||||||
return
|
return
|
||||||
|
|
|
@ -173,6 +173,8 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
|
||||||
self.webInterface=webinterface.WebInterface(self)
|
self.webInterface=webinterface.WebInterface(self)
|
||||||
self.webThread = Thread(target=webinterface.StartWebInterfaceThread, args=(self.webInterface, ))
|
self.webThread = Thread(target=webinterface.StartWebInterfaceThread, args=(self.webInterface, ))
|
||||||
self.webThread.start()
|
self.webThread.start()
|
||||||
|
if(self.filename is not None):
|
||||||
|
self.do_load(self.filename)
|
||||||
|
|
||||||
def startcb(self):
|
def startcb(self):
|
||||||
self.starttime=time.time()
|
self.starttime=time.time()
|
||||||
|
@ -1554,6 +1556,12 @@ class PronterWindow(wx.Frame,pronsole.pronsole):
|
||||||
thread(target=self.skein_func).start()
|
thread(target=self.skein_func).start()
|
||||||
thread(target=self.skein_monitor).start()
|
thread(target=self.skein_monitor).start()
|
||||||
|
|
||||||
|
def do_load(self,l):
|
||||||
|
if hasattr(self, 'skeining'):
|
||||||
|
self.loadfile(None, l)
|
||||||
|
else:
|
||||||
|
self._do_load(l)
|
||||||
|
|
||||||
def loadfile(self,event,filename=None):
|
def loadfile(self,event,filename=None):
|
||||||
if self.skeining and self.skeinp is not None:
|
if self.skeining and self.skeinp is not None:
|
||||||
self.skeinp.terminate()
|
self.skeinp.terminate()
|
||||||
|
|
Loading…
Reference in New Issue