Commit 4b4e4a2b authored by Guillaume Seguin's avatar Guillaume Seguin

Move setlayer() call to printsentcb

parent 218ce7f0
......@@ -371,13 +371,6 @@ class PronterWindow(MainWindow, pronsole.pronsole):
def sentcb(self, line, gline):
if not gline:
pass
elif gline.is_move:
if gline.z is not None:
layer = gline.z
if layer != self.curlayer:
self.curlayer = layer
wx.CallAfter(self.gviz.clearhilights)
wx.CallAfter(self.gviz.setlayer, layer)
elif gline.command in ["M104", "M109"]:
gline_s = gcoder.S(gline)
if gline_s is not None:
......@@ -442,10 +435,17 @@ class PronterWindow(MainWindow, pronsole.pronsole):
return None
def printsentcb(self, gline):
if gline.is_move and hasattr(self.gwindow, "set_current_gline"):
wx.CallAfter(self.gwindow.set_current_gline, gline)
if gline.is_move and hasattr(self.gviz, "set_current_gline"):
wx.CallAfter(self.gviz.set_current_gline, gline)
if gline.is_move:
if gline.z is not None:
layer = gline.z
if layer != self.curlayer:
self.curlayer = layer
wx.CallAfter(self.gviz.clearhilights)
wx.CallAfter(self.gviz.setlayer, layer)
if hasattr(self.gwindow, "set_current_gline"):
wx.CallAfter(self.gwindow.set_current_gline, gline)
if hasattr(self.gviz, "set_current_gline"):
wx.CallAfter(self.gviz.set_current_gline, gline)
def do_pront_extrude(self, l = ""):
feed = self.settings.e_feedrate
......
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