WIP: Fix layer_height fetching that inherits the default

Fix layer height fetching for those quality profiles that inherits the
layer height from the definition.
This commit is contained in:
Lipu Fei 2018-02-17 14:48:09 +01:00
parent 9dce0afaea
commit 171a05ae6a

View file

@ -88,10 +88,12 @@ class NewQualityProfilesModel(ListModel):
unit = ""
self._layer_height_unit = unit
default_layer_height = active_global_stack.definition.getProperty("layer_height", "value")
# Get layer_height from the quality profile for the GlobalStack
container = quality_group.node_for_global.getContainer()
layer_height = ""
layer_height = default_layer_height
if container.hasProperty("layer_height", "value"):
layer_height = str(container.getProperty("layer_height", "value"))
else: