Commit f5d2617e authored by Guillaume Seguin's avatar Guillaume Seguin

Fix main viewers

parent 8a408899
......@@ -57,6 +57,9 @@ class GcodeViewPanel(wxGLPanel):
self.basequat = [0, 0, 0, 1]
self.mousepos = [0, 0]
def setlayercb(self, layer):
pass
def create_objects(self):
'''create opengl objects when opengl is initialized'''
for obj in self.parent.objects:
......
......@@ -382,8 +382,9 @@ class Gviz(wx.Panel):
self.clear()
self.add_parsed_gcodes(gcode.lines)
max_layers = len(self.layers)
self.parent.layerslider.SetRange(0, max_layers - 1)
self.parent.layerslider.SetValue(0)
if hasattr(self.parent, "layerslider"):
self.parent.layerslider.SetRange(0, max_layers - 1)
self.parent.layerslider.SetValue(0)
# FIXME : there's code duplication going on there, we should factor it (but
# the reason addgcode is not factored as a add_parsed_gcodes([gline]) is
......
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