From c3d9c1b3d8058876e328369a768c8619531e6938 Mon Sep 17 00:00:00 2001 From: Diego Prado Gesto Date: Mon, 4 Dec 2017 09:49:03 +0100 Subject: [PATCH] CURA-4667 Fix simulation view render race. Change the place where the layer data is reset. --- plugins/CuraEngineBackend/ProcessSlicedLayersJob.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py index 7a43b43fd0..26a8269183 100644 --- a/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py +++ b/plugins/CuraEngineBackend/ProcessSlicedLayersJob.py @@ -61,7 +61,9 @@ class ProcessSlicedLayersJob(Job): def run(self): 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() Job.yieldThread() if self._abort_requested: @@ -208,10 +210,6 @@ class ProcessSlicedLayersJob(Job): self._progress_message.hide() 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 decorator = LayerDataDecorator.LayerDataDecorator() decorator.setLayerData(layer_mesh)