mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-29 15:25:02 +08:00
Partial fix for infinite recursion when trying to call getProperty
This commit is contained in:
parent
82333a244b
commit
a16b5d73b6
@ -23,6 +23,8 @@ class GlobalStack(CuraContainerStack):
|
||||
|
||||
self._extruders = []
|
||||
|
||||
self._resolving_property = None
|
||||
|
||||
@pyqtProperty("QVariantList")
|
||||
def extruders(self) -> list:
|
||||
return self._extruders
|
||||
@ -37,8 +39,9 @@ class GlobalStack(CuraContainerStack):
|
||||
## Overridden from ContainerStack
|
||||
@override(ContainerStack)
|
||||
def getProperty(self, key: str, property_name: str) -> Any:
|
||||
if property_name == "value":
|
||||
if property_name == "value" and not self._resolving_property:
|
||||
if not self.hasUserValue(key):
|
||||
self._resolving_property = key
|
||||
resolve = super().getProperty(key, "resolve")
|
||||
if resolve:
|
||||
return resolve
|
||||
|
Loading…
x
Reference in New Issue
Block a user