mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-07 22:13:58 -06:00
Fix off-by-one bug when importing profiles with extruder stacks
Since machine_extruders contains only the extruder stacks (not the global stack) but profile_index counts through all stacks including the global stack, we need to increase the length of machine_extruders by 1 when comparing. I also swapped the comparison around since I think it's more logical this way around. Contributes to issue CURA-4738.
This commit is contained in:
parent
689a18ee57
commit
a87465186e
1 changed files with 1 additions and 1 deletions
|
@ -224,7 +224,7 @@ class CuraContainerRegistry(ContainerRegistry):
|
|||
# This is assumed to be the global profile
|
||||
profile_id = (global_container_stack.getBottom().getId() + "_" + name_seed).lower().replace(" ", "_")
|
||||
|
||||
elif len(machine_extruders) > profile_index:
|
||||
elif profile_index < len(machine_extruders) + 1:
|
||||
# This is assumed to be an extruder profile
|
||||
extruder_id = Application.getInstance().getMachineManager().getQualityDefinitionId(machine_extruders[profile_index - 1].getBottom())
|
||||
if not profile.getMetaDataEntry("extruder"):
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue