mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-10 08:17:49 -06:00
Store layer_height as float
This commit is contained in:
parent
e87077802f
commit
afae550b5a
1 changed files with 3 additions and 3 deletions
|
@ -78,7 +78,7 @@ class QualityProfilesDropDownMenuModel(ListModel):
|
||||||
item_list.append(item)
|
item_list.append(item)
|
||||||
|
|
||||||
# Sort items based on layer_height
|
# Sort items based on layer_height
|
||||||
item_list = sorted(item_list, key = lambda x: float(x["layer_height"]))
|
item_list = sorted(item_list, key = lambda x: x["layer_height"])
|
||||||
|
|
||||||
self.setItems(item_list)
|
self.setItems(item_list)
|
||||||
|
|
||||||
|
@ -97,10 +97,10 @@ class QualityProfilesDropDownMenuModel(ListModel):
|
||||||
|
|
||||||
layer_height = default_layer_height
|
layer_height = default_layer_height
|
||||||
if container.hasProperty("layer_height", "value"):
|
if container.hasProperty("layer_height", "value"):
|
||||||
layer_height = str(container.getProperty("layer_height", "value"))
|
layer_height = 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
|
||||||
container = global_stack.definition
|
container = global_stack.definition
|
||||||
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")
|
||||||
return str(layer_height)
|
return float(layer_height)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue