Commit f5d2617e authored by Guillaume Seguin's avatar Guillaume Seguin

Fix main viewers

parent 8a408899
...@@ -57,6 +57,9 @@ class GcodeViewPanel(wxGLPanel): ...@@ -57,6 +57,9 @@ class GcodeViewPanel(wxGLPanel):
self.basequat = [0, 0, 0, 1] self.basequat = [0, 0, 0, 1]
self.mousepos = [0, 0] self.mousepos = [0, 0]
def setlayercb(self, layer):
pass
def create_objects(self): def create_objects(self):
'''create opengl objects when opengl is initialized''' '''create opengl objects when opengl is initialized'''
for obj in self.parent.objects: for obj in self.parent.objects:
......
...@@ -382,6 +382,7 @@ class Gviz(wx.Panel): ...@@ -382,6 +382,7 @@ class Gviz(wx.Panel):
self.clear() self.clear()
self.add_parsed_gcodes(gcode.lines) self.add_parsed_gcodes(gcode.lines)
max_layers = len(self.layers) max_layers = len(self.layers)
if hasattr(self.parent, "layerslider"):
self.parent.layerslider.SetRange(0, max_layers - 1) self.parent.layerslider.SetRange(0, max_layers - 1)
self.parent.layerslider.SetValue(0) self.parent.layerslider.SetValue(0)
......
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