mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 10:17:52 -06:00
Fix changes in per object settings not triggering reslice
Contributes to #5639
This commit is contained in:
parent
905889214a
commit
c694e530be
1 changed files with 11 additions and 14 deletions
|
@ -113,21 +113,18 @@ class SettingOverrideDecorator(SceneNodeDecorator):
|
|||
|
||||
def _onSettingChanged(self, setting_key, property_name): # Reminder: 'property' is a built-in function
|
||||
# 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.
|
||||
new_is_non_printing_mesh = self._evaluateIsNonPrintingMesh()
|
||||
new_is_non_thumbnail_visible_mesh = self._evaluateIsNonThumbnailVisibleMesh()
|
||||
changed = False
|
||||
if self._is_non_printing_mesh != new_is_non_printing_mesh:
|
||||
self._is_non_printing_mesh = new_is_non_printing_mesh
|
||||
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 property_name == "value":
|
||||
if 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.
|
||||
new_is_non_printing_mesh = self._evaluateIsNonPrintingMesh()
|
||||
self._is_non_thumbnail_visible_mesh = self._evaluateIsNonThumbnailVisibleMesh()
|
||||
|
||||
if changed:
|
||||
Application.getInstance().getBackend().needsSlicing()
|
||||
Application.getInstance().getBackend().tickle()
|
||||
if self._is_non_printing_mesh != new_is_non_printing_mesh:
|
||||
self._is_non_printing_mesh = new_is_non_printing_mesh
|
||||
self._node.setCalculateBoundingBox(not self._is_non_printing_mesh)
|
||||
|
||||
Application.getInstance().getBackend().needsSlicing()
|
||||
Application.getInstance().getBackend().tickle()
|
||||
|
||||
## Makes sure that the stack upon which the container stack is placed is
|
||||
# kept up to date.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue