diff options
author | Remco Burema <r.burema@ultimaker.com> | 2019-12-31 18:14:02 +0300 |
---|---|---|
committer | Remco Burema <r.burema@ultimaker.com> | 2019-12-31 18:14:02 +0300 |
commit | cb361e9543941fbcae69deda4c4b089025c1921b (patch) | |
tree | 112f2e1b29c5be4dbd86fa4e1772d710be26799b /plugins | |
parent | c38ce5370d55b767eacdcd71391d944a19931c4d (diff) |
Force sim-view to update after view-type change.
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/SimulationView/SimulationView.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/SimulationView/SimulationView.py b/plugins/SimulationView/SimulationView.py index 6d6f19c57c..265289c263 100644 --- a/plugins/SimulationView/SimulationView.py +++ b/plugins/SimulationView/SimulationView.py @@ -292,8 +292,12 @@ class SimulationView(CuraView): # # \param layer_view_type integer as in SimulationView.qml and this class def setSimulationViewType(self, layer_view_type: int) -> None: - self._layer_view_type = layer_view_type - self.currentLayerNumChanged.emit() + if layer_view_type != self._layer_view_type: + 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: |