mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 18:57:52 -06:00
Trigger to re-evaluate default settings in per-object settings when the active stack gets changed.
CURA-4186 Trigger signals to re-evaluate default settings in pre-object settings when the active stack gets changed. Otherwise the values won't be updated directly.
This commit is contained in:
parent
a320784a6d
commit
141aad5513
1 changed files with 13 additions and 0 deletions
|
@ -51,3 +51,16 @@ class PerObjectContainerStack(ContainerStack):
|
|||
result = super().getProperty(key, property_name, context)
|
||||
context.popContainer()
|
||||
return result
|
||||
|
||||
@override(ContainerStack)
|
||||
def setNextStack(self, stack: ContainerStack):
|
||||
super().setNextStack(stack)
|
||||
|
||||
# trigger signal to re-evaluate all default settings
|
||||
for key, instance in self.getContainer(0)._instances.items():
|
||||
# only evaluate default settings
|
||||
if instance.state != InstanceState.Default:
|
||||
continue
|
||||
|
||||
self._collectPropertyChanges(key, "value")
|
||||
self._emitCollectedPropertyChanges()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue