Commit 8dc45fa9 authored by Guillaume Seguin's avatar Guillaume Seguin

Make model usable as soon as possible in gcview

parent d83ebe01
...@@ -263,6 +263,7 @@ class GcodeViewLoader(object): ...@@ -263,6 +263,7 @@ class GcodeViewLoader(object):
def addfile_perlayer(self, gcode = None, showall = False): def addfile_perlayer(self, gcode = None, showall = False):
self.model = create_model(self.root.settings.light3d self.model = create_model(self.root.settings.light3d
if self.root else False) if self.root else False)
self.objects[-1].model = self.model
if self.root: if self.root:
set_model_colors(self.model, self.root) set_model_colors(self.model, self.root)
if gcode is not None: if gcode is not None:
...@@ -271,7 +272,6 @@ class GcodeViewLoader(object): ...@@ -271,7 +272,6 @@ class GcodeViewLoader(object):
while generator_output is not None: while generator_output is not None:
yield generator_output yield generator_output
generator_output = generator.next() generator_output = generator.next()
self.objects[-1].model = self.model
wx.CallAfter(self.Refresh) wx.CallAfter(self.Refresh)
yield None yield None
......
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