Commit 95316691 authored by Guillaume Seguin's avatar Guillaume Seguin

Load parent filenames in gcview if any

parent 53fb79a6
...@@ -55,6 +55,14 @@ class GcodeViewPanel(wxGLPanel): ...@@ -55,6 +55,14 @@ class GcodeViewPanel(wxGLPanel):
def setlayercb(self, layer): def setlayercb(self, layer):
pass pass
def OnInitGL(self, *args, **kwargs):
super(GcodeViewPanel, self).OnInitGL(*args, **kwargs)
if hasattr(self.parent, "filenames") and self.parent.filenames:
for filename in self.parent.filenames:
self.parent.load_file(filename)
self.parent.autoplate()
self.parent.filenames = None
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:
......
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