mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
Update the global value when the "global_inherits_stack" value changes
CURA-1758
This commit is contained in:
parent
16315b6e1d
commit
81f9467ca0
1 changed files with 11 additions and 0 deletions
|
@ -223,6 +223,17 @@ class MachineManager(QObject):
|
||||||
extruder_stack.getTop().setProperty(key, "value", new_value)
|
extruder_stack.getTop().setProperty(key, "value", new_value)
|
||||||
self._global_container_stack.getTop().setProperty(key, "value", new_value)
|
self._global_container_stack.getTop().setProperty(key, "value", new_value)
|
||||||
|
|
||||||
|
if property_name == "global_inherits_stack":
|
||||||
|
if self._active_container_stack and self._active_container_stack != self._global_container_stack:
|
||||||
|
# Update the global user value when the "global_inherits_stack" function points to a different stack
|
||||||
|
stack_index = int(self._active_container_stack.getProperty(key, property_name))
|
||||||
|
extruder_stacks = [stack for stack in ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())]
|
||||||
|
|
||||||
|
if len(extruder_stacks) > stack_index:
|
||||||
|
new_value = extruder_stacks[stack_index].getProperty(key, "value")
|
||||||
|
if self._global_container_stack.getProperty(key, "value") != new_value:
|
||||||
|
self._global_container_stack.getTop().setProperty(key, "value", new_value)
|
||||||
|
|
||||||
if property_name == "validationState":
|
if property_name == "validationState":
|
||||||
if self._global_stack_valid:
|
if self._global_stack_valid:
|
||||||
changed_validation_state = self._active_container_stack.getProperty(key, property_name)
|
changed_validation_state = self._active_container_stack.getProperty(key, property_name)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue