mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-05-30 01:55:55 +08:00
Also skip empty containers when getting layer height for a quality profile
CURA-4133 On some machines such as UM2, there is no material. Getting the layer height in this case will result back to the global stack itself, which is the layer height of the current setting. This is a problem for "Normal" (or "Fine") quality because it uses the machine's default layer height.
This commit is contained in:
parent
8c6abc85fc
commit
ab3d8349b6
@ -108,9 +108,9 @@ class ProfilesModel(InstanceContainersModel):
|
|||||||
|
|
||||||
#Quality has no value for layer height either. Get the layer height from somewhere lower in the stack.
|
#Quality has no value for layer height either. Get the layer height from somewhere lower in the stack.
|
||||||
skip_until_container = global_container_stack.material
|
skip_until_container = global_container_stack.material
|
||||||
if not skip_until_container: #No material in stack.
|
if not skip_until_container or skip_until_container == ContainerRegistry.getInstance().getEmptyInstanceContainer(): #No material in stack.
|
||||||
skip_until_container = global_container_stack.variant
|
skip_until_container = global_container_stack.variant
|
||||||
if not skip_until_container: #No variant in stack.
|
if not skip_until_container or skip_until_container == ContainerRegistry.getInstance().getEmptyInstanceContainer(): #No variant in stack.
|
||||||
skip_until_container = global_container_stack.getBottom()
|
skip_until_container = global_container_stack.getBottom()
|
||||||
item["layer_height"] = str(global_container_stack.getRawProperty("layer_height", "value", skip_until_container = skip_until_container.getId())) + unit #Fall through to the currently loaded material.
|
item["layer_height"] = str(global_container_stack.getRawProperty("layer_height", "value", skip_until_container = skip_until_container.getId())) + unit #Fall through to the currently loaded material.
|
||||||
yield item
|
yield item
|
Loading…
x
Reference in New Issue
Block a user