Fix: Layersliders work again.

This commit is contained in:
Remco Burema 2019-12-31 16:48:50 +01:00
parent cb361e9543
commit 1915100118
No known key found for this signature in database
GPG key ID: 215C49431D43F98C
2 changed files with 5 additions and 3 deletions

View file

@ -296,9 +296,6 @@ class SimulationView(CuraView):
self._layer_view_type = layer_view_type self._layer_view_type = layer_view_type
self.currentLayerNumChanged.emit() 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 ## Return the layer view type, integer as in SimulationView.qml and this class
def getSimulationViewType(self) -> int: def getSimulationViewType(self) -> int:
return self._layer_view_type return self._layer_view_type
@ -575,6 +572,8 @@ class SimulationView(CuraView):
def _onCurrentLayerNumChanged(self) -> None: def _onCurrentLayerNumChanged(self) -> None:
self.calculateMaxPathsOnLayer(self._current_layer_num) self.calculateMaxPathsOnLayer(self._current_layer_num)
scene = Application.getInstance().getController().getScene()
scene.sceneChanged.emit(scene.getRoot())
def _startUpdateTopLayers(self) -> None: def _startUpdateTopLayers(self) -> None:
if not self._compatibility_mode: if not self._compatibility_mode:

View file

@ -149,6 +149,9 @@ class SimulationViewProxy(QObject):
self.currentPathChanged.emit() self.currentPathChanged.emit()
self._layerActivityChanged() self._layerActivityChanged()
scene = Application.getInstance().getController().getScene()
scene.sceneChanged.emit(scene.getRoot())
def _onMaxLayersChanged(self): def _onMaxLayersChanged(self):
self.maxLayersChanged.emit() self.maxLayersChanged.emit()