Start overriding getProperty in GlobalStack

Since we have the "resolve" property, we should transparently handle it
so lookup can just use "value".

Contributes to CURA-3497
This commit is contained in:
Arjen Hiemstra 2017-03-20 17:30:00 +01:00
parent 0656dd53c3
commit 4904e449a0

View file

@ -12,6 +12,14 @@ class GlobalStack(ContainerStack):
def __init__(self, container_id, *args, **kwargs): def __init__(self, container_id, *args, **kwargs):
super().__init__(container_id, *args, **kwargs) super().__init__(container_id, *args, **kwargs)
def getProperty(self, key, property_name):
if property_name == "value":
resolve = super().getProperty(key, "resolve")
if resolve:
return resolve
return super().getProperty(key, property_name)
def setNextStack(self, next_stack): def setNextStack(self, next_stack):
raise CannotSetNextStackError("Global stack cannot have a next stack!") raise CannotSetNextStackError("Global stack cannot have a next stack!")