Allow extruderValue(s) to fallback to global

If a setting is not defined in the extruder stack, fall back to global. At least it still tries to get the extruder value from the correct stack first. If that stack has no value, then so be it, use global anyway.

Contributes to issue CURA-2024. Also could affect issue CURA-2006.
This commit is contained in:
Ghostkeeper 2016-08-04 16:54:29 +02:00
parent 93f6f5d8d3
commit 50cd98f2bb
No known key found for this signature in database
GPG Key ID: 701948C5954A7385

View File

@ -298,7 +298,7 @@ class ExtruderManager(QObject):
result = []
for extruder in ExtruderManager.getInstance().getMachineExtruders(global_stack.getId()):
value = extruder.getRawProperty(key, "value", use_next = False)
value = extruder.getRawProperty(key, "value")
if not value:
continue
@ -327,7 +327,7 @@ class ExtruderManager(QObject):
value = None
if extruder:
value = extruder.getRawProperty(key, "value", use_next = False)
value = extruder.getRawProperty(key, "value")
if isinstance(value, UM.Settings.SettingFunction):
value = value(extruder)