Add missing context in getProperty() in global and extruder stacks

CURA-4186

All getProperty() calls should use the provided context.
This commit is contained in:
Lipu Fei 2017-08-24 17:01:01 +02:00
parent 2ec7c14422
commit 365379f735
2 changed files with 9 additions and 5 deletions

View file

@ -65,12 +65,14 @@ class ExtruderStack(CuraContainerStack):
context = PropertyEvaluationContext()
context.pushContainer(self)
if not super().getProperty(key, "settable_per_extruder"):
if not super().getProperty(key, "settable_per_extruder", context):
result = self.getNextStack().getProperty(key, property_name, context)
context.popContainer()
return result
limit_to_extruder = super().getProperty(key, "limit_to_extruder")
limit_to_extruder = super().getProperty(key, "limit_to_extruder", context)
if limit_to_extruder is not None:
limit_to_extruder = str(limit_to_extruder)
if (limit_to_extruder is not None and limit_to_extruder != "-1") and self.getMetaDataEntry("position") != str(limit_to_extruder):
if str(limit_to_extruder) in self.getNextStack().extruders:
result = self.getNextStack().extruders[str(limit_to_extruder)].getProperty(key, property_name, context)