diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 265289c263..4282806ff5 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -296,9 +296,6 @@ class SimulationView(CuraView): self._layer_view_type = layer_view_type self.currentLayerNumChanged.emit() - scene = Application.getInstance().getController().getScene() - scene.sceneChanged.emit(scene.getRoot()) - ## Return the layer view type, integer as in SimulationView.qml and this class def getSimulationViewType(self) -> int: return self._layer_view_type @@ -575,6 +572,8 @@ class SimulationView(CuraView): def _onCurrentLayerNumChanged(self) -> None: self.calculateMaxPathsOnLayer(self._current_layer_num) + scene = Application.getInstance().getController().getScene() + scene.sceneChanged.emit(scene.getRoot()) def _startUpdateTopLayers(self) -> None: if not self._compatibility_mode: diff --git a/plugins/SimulationView/SimulationViewProxy.py b/plugins/SimulationView/SimulationViewProxy.py index 58a004cc31..1183244ab3 100644 --- a/plugins/SimulationView/SimulationViewProxy.py +++ b/plugins/SimulationView/SimulationViewProxy.py @@ -149,6 +149,9 @@ class SimulationViewProxy(QObject): self.currentPathChanged.emit() self._layerActivityChanged() + scene = Application.getInstance().getController().getScene() + scene.sceneChanged.emit(scene.getRoot()) + def _onMaxLayersChanged(self): self.maxLayersChanged.emit()