CURA-4667 Fix simulation view render race. Change the place where the

layer data is reset.
This commit is contained in:
Diego Prado Gesto 2017-12-04 09:49:03 +01:00
parent 033a4615eb
commit c3d9c1b3d8

View file

@ -61,7 +61,9 @@ class ProcessSlicedLayersJob(Job):
def run(self): def run(self):
start_time = time() start_time = time()
if Application.getInstance().getController().getActiveView().getPluginId() == "SimulationView": view = Application.getInstance().getController().getActiveView()
if view.getPluginId() == "SimulationView":
view.resetLayerData()
self._progress_message.show() self._progress_message.show()
Job.yieldThread() Job.yieldThread()
if self._abort_requested: if self._abort_requested:
@ -208,10 +210,6 @@ class ProcessSlicedLayersJob(Job):
self._progress_message.hide() self._progress_message.hide()
return return
view = Application.getInstance().getController().getActiveView()
if view.getPluginId() == "SimulationView":
view.resetLayerData()
# Add LayerDataDecorator to scene node to indicate that the node has layer data # Add LayerDataDecorator to scene node to indicate that the node has layer data
decorator = LayerDataDecorator.LayerDataDecorator() decorator = LayerDataDecorator.LayerDataDecorator()
decorator.setLayerData(layer_mesh) decorator.setLayerData(layer_mesh)