Do not react to all Scene changes in LayerView but just childrenChanged

When the layer data is updated, a new node is attached to the scene
root. We can thus watch for only children changes since everything else
can be ignored.

Contributes to CURA-938
This commit is contained in:
Arjen Hiemstra 2016-03-01 02:09:06 +01:00
parent f2d98cfba3
commit 110c3fa754

View file

@ -36,7 +36,7 @@ class LayerView(View):
self._num_layers = 0
self._layer_percentage = 0 # what percentage of layers need to be shown (SLider gives value between 0 - 100)
self._proxy = LayerViewProxy.LayerViewProxy()
self._controller.getScene().sceneChanged.connect(self._onSceneChanged)
self._controller.getScene().getRoot().childrenChanged.connect(self._onSceneChanged)
self._max_layers = 10
self._current_layer_num = 10
self._current_layer_mesh = None