mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 20:28:01 -06:00
Prevent accessing private _instances variable
We can get at this via the getProperty function. Contributes to issue CURA-5330.
This commit is contained in:
parent
01a645e726
commit
4418cf3aac
1 changed files with 3 additions and 3 deletions
|
@ -22,7 +22,7 @@ class PerObjectContainerStack(CuraContainerStack):
|
|||
|
||||
# Return the user defined value if present, otherwise, evaluate the value according to the default routine.
|
||||
if self.getContainer(0).hasProperty(key, property_name):
|
||||
if self.getContainer(0)._instances[key].state == InstanceState.User:
|
||||
if self.getContainer(0).getProperty(key, "state") == InstanceState.User:
|
||||
result = super().getProperty(key, property_name, context)
|
||||
context.popContainer()
|
||||
return result
|
||||
|
@ -59,9 +59,9 @@ class PerObjectContainerStack(CuraContainerStack):
|
|||
super().setNextStack(stack)
|
||||
|
||||
# trigger signal to re-evaluate all default settings
|
||||
for key, instance in self.getContainer(0)._instances.items():
|
||||
for key in self.getContainer(0).getAllKeys():
|
||||
# only evaluate default settings
|
||||
if instance.state != InstanceState.Default:
|
||||
if self.getContainer(0).getProperty(key, "state") != InstanceState.Default:
|
||||
continue
|
||||
|
||||
self._collectPropertyChanges(key, "value")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue