CURA-4606 fallback value for layer height must come from definition

This commit is contained in:
Jack Ha 2018-02-20 09:54:22 +01:00
parent 6cc65e97f2
commit 21c4753443

View File

@ -90,9 +90,7 @@ class QualityProfilesModel(ListModel):
layer_height = str(container.getProperty("layer_height", "value")) layer_height = str(container.getProperty("layer_height", "value"))
else: else:
# Look for layer_height in the GlobalStack from material -> definition # Look for layer_height in the GlobalStack from material -> definition
for idx in range(4): container = active_global_stack.definition
container = active_global_stack.getContainer(idx) if container.hasProperty("layer_height", "value"):
if container.hasProperty("layer_height", "value"): layer_height = container.getProperty("layer_height", "value")
layer_height = container.getProperty("layer_height", "value")
break
return str(layer_height) return str(layer_height)