From 833a7a3804e67d3c45f48839de314ae7412def4d Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Fri, 15 May 2020 15:04:47 +0200 Subject: [PATCH] Don't use deprecated extruders() It has been replaced by extruderList. Done during Turbo Testing and Tooling to reduce the number of warnings in our log. --- cura/Machines/Models/BaseMaterialsModel.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/cura/Machines/Models/BaseMaterialsModel.py b/cura/Machines/Models/BaseMaterialsModel.py index 5e672faa12..b4b677d8cc 100644 --- a/cura/Machines/Models/BaseMaterialsModel.py +++ b/cura/Machines/Models/BaseMaterialsModel.py @@ -150,9 +150,10 @@ class BaseMaterialsModel(ListModel): global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack() if not global_stack.hasMaterials: return # There are no materials for this machine, so nothing to do. - extruder_stack = global_stack.extruders.get(str(self._extruder_position)) - if not extruder_stack: + extruder_list = global_stack.extruderList + if self._extruder_position > len(extruder_list): return + extruder_stack = extruder_list[self._extruder_position] nozzle_name = extruder_stack.variant.getName() machine_node = ContainerTree.getInstance().machines[global_stack.definition.getId()] if nozzle_name not in machine_node.variants: