mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-14 17:33:20 +08:00
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:
parent
f2d98cfba3
commit
110c3fa754
@ -36,7 +36,7 @@ class LayerView(View):
|
|||||||
self._num_layers = 0
|
self._num_layers = 0
|
||||||
self._layer_percentage = 0 # what percentage of layers need to be shown (SLider gives value between 0 - 100)
|
self._layer_percentage = 0 # what percentage of layers need to be shown (SLider gives value between 0 - 100)
|
||||||
self._proxy = LayerViewProxy.LayerViewProxy()
|
self._proxy = LayerViewProxy.LayerViewProxy()
|
||||||
self._controller.getScene().sceneChanged.connect(self._onSceneChanged)
|
self._controller.getScene().getRoot().childrenChanged.connect(self._onSceneChanged)
|
||||||
self._max_layers = 10
|
self._max_layers = 10
|
||||||
self._current_layer_num = 10
|
self._current_layer_num = 10
|
||||||
self._current_layer_mesh = None
|
self._current_layer_mesh = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user