mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-18 04:25:56 +08:00
Prevend unneeded tickles of the backend for setting override decorators
This commit is contained in:
parent
1755ed64ea
commit
abb13e8992
@ -114,12 +114,19 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||||||
def _onSettingChanged(self, instance, property_name): # Reminder: 'property' is a built-in function
|
def _onSettingChanged(self, instance, property_name): # Reminder: 'property' is a built-in function
|
||||||
if property_name == "value":
|
if property_name == "value":
|
||||||
# Trigger slice/need slicing if the value has changed.
|
# Trigger slice/need slicing if the value has changed.
|
||||||
self._is_non_printing_mesh = self._evaluateIsNonPrintingMesh()
|
new_is_non_printing_mesh = self._evaluateIsNonPrintingMesh()
|
||||||
self._is_non_thumbnail_visible_mesh = self._evaluateIsNonThumbnailVisibleMesh()
|
new_is_non_thumbnail_visible_mesh = self._evaluateIsNonThumbnailVisibleMesh()
|
||||||
# Only calculate the bounding box of the mesh if it's an actual mesh (and not a helper)
|
changed = False
|
||||||
self._node.setCalculateBoundingBox(not self._is_non_printing_mesh)
|
if self._is_non_printing_mesh != new_is_non_printing_mesh:
|
||||||
Application.getInstance().getBackend().needsSlicing()
|
self._is_non_printing_mesh = new_is_non_printing_mesh
|
||||||
Application.getInstance().getBackend().tickle()
|
self._node.setCalculateBoundingBox(not self._is_non_printing_mesh)
|
||||||
|
changed = True
|
||||||
|
if self._is_non_thumbnail_visible_mesh != new_is_non_thumbnail_visible_mesh:
|
||||||
|
changed = True
|
||||||
|
|
||||||
|
if changed:
|
||||||
|
Application.getInstance().getBackend().needsSlicing()
|
||||||
|
Application.getInstance().getBackend().tickle()
|
||||||
|
|
||||||
## Makes sure that the stack upon which the container stack is placed is
|
## Makes sure that the stack upon which the container stack is placed is
|
||||||
# kept up to date.
|
# kept up to date.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user