Add fallback if no unit is known for layer_height

If there is no unit known, it is interpreted as there being no unit. There is currently mm, but if we changed that it is probably on purpose so we write no unit.

Contributes to issue CURA-2723.
This commit is contained in:
Ghostkeeper 2016-10-25 11:28:15 +02:00
parent 844b9729f4
commit e6c68bcdc9
No known key found for this signature in database
GPG key ID: C5F96EE2BC0F7E75

View file

@ -56,6 +56,8 @@ class ProfilesModel(InstanceContainersModel):
machine_manager = Application.getInstance().getMachineManager()
unit = global_container_stack.getBottom().getProperty("layer_height", "unit")
if not unit:
unit = ""
for item in super()._recomputeItems():
profile = container_registry.findContainers(id = item["id"])