From 4482b4f352d4cc886c21c707268bd9d81cd584f8 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 15 May 2020 15:14:56 +0200 Subject: [PATCH] Use extruderList rather than deprecated extruders This fixes a possible bug, too, if the extruders dictionary weren't iterated over in the order of the extruders. It would sometimes assign the profiles to the wrong extruders then. However I think the dictionary iteration in Python is in order of insertion and we probably insert them in the proper order by accident. Done during Turbo Testing and Tooling to reduce the number of warnings in our log. --- cura/Settings/CuraContainerRegistry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cura/Settings/CuraContainerRegistry.py b/cura/Settings/CuraContainerRegistry.py index dca9564ef7..00d2719793 100644 --- a/cura/Settings/CuraContainerRegistry.py +++ b/cura/Settings/CuraContainerRegistry.py @@ -261,7 +261,7 @@ class CuraContainerRegistry(ContainerRegistry): if len(profile_or_list) == 1: global_profile = profile_or_list[0] extruder_profiles = [] - for idx, extruder in enumerate(global_stack.extruders.values()): + for idx, extruder in enumerate(global_stack.extruderList): profile_id = ContainerRegistry.getInstance().uniqueName(global_stack.getId() + "_extruder_" + str(idx + 1)) profile = InstanceContainer(profile_id) profile.setName(quality_name)