mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 11:05:57 +08:00
Greatly decrease amount of tickles to the backend for settingOverrideDecorator
This commit is contained in:
parent
abb13e8992
commit
8267ef670a
@ -111,8 +111,9 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||||||
def _evaluateIsNonThumbnailVisibleMesh(self):
|
def _evaluateIsNonThumbnailVisibleMesh(self):
|
||||||
return any(bool(self._stack.getProperty(setting, "value")) for setting in self._non_thumbnail_visible_settings)
|
return any(bool(self._stack.getProperty(setting, "value")) for setting in self._non_thumbnail_visible_settings)
|
||||||
|
|
||||||
def _onSettingChanged(self, instance, property_name): # Reminder: 'property' is a built-in function
|
def _onSettingChanged(self, setting_key, property_name): # Reminder: 'property' is a built-in function
|
||||||
if property_name == "value":
|
# We're only interested in a few settings and only if it's value changed.
|
||||||
|
if property_name == "value" and (setting_key in self._non_printing_mesh_settings or setting_key in self._non_thumbnail_visible_settings):
|
||||||
# Trigger slice/need slicing if the value has changed.
|
# Trigger slice/need slicing if the value has changed.
|
||||||
new_is_non_printing_mesh = self._evaluateIsNonPrintingMesh()
|
new_is_non_printing_mesh = self._evaluateIsNonPrintingMesh()
|
||||||
new_is_non_thumbnail_visible_mesh = self._evaluateIsNonThumbnailVisibleMesh()
|
new_is_non_thumbnail_visible_mesh = self._evaluateIsNonThumbnailVisibleMesh()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user