Skip to content

Commit

Permalink
FIX: Progressive rendering during loading
Browse files Browse the repository at this point in the history
Request 3d view Refresh() when some layers are loaded.
This is not enough, next commit also needed, but split fix for testing
  • Loading branch information
volconst committed Sep 27, 2020
1 parent e1887f6 commit 7140925
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions printrun/pronterface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1604,7 +1604,7 @@ def output_gcode_stats(self):

self.log(_("%.2fmm of filament used in this print") % gcode.filament_length)

if(len(gcode.filament_length_multi)>1):
if len(gcode.filament_length_multi) > 1:
for i in enumerate(gcode.filament_length_multi):
if self.spool_manager.getSpoolName(i[0]) == None:
logging.info("- Extruder %d: %0.02fmm" % (i[0], i[1]))
Expand Down Expand Up @@ -1649,13 +1649,16 @@ def loadviz(self, gcode = None):
max_layer = self.viz_last_layer
if max_layer is None:
break
start_layer = next_layer
while next_layer <= max_layer:
assert(next(generator) == next_layer)
assert next(generator) == next_layer
next_layer += 1
if next_layer != start_layer:
wx.CallAfter(self.gviz.Refresh)
time.sleep(0.1)
generator_output = next(generator)
while generator_output is not None:
assert(generator_output in (None, next_layer))
assert generator_output == next_layer
next_layer += 1
generator_output = next(generator)
else:
Expand Down

0 comments on commit 7140925

Please sign in to comment.