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.
This commit is contained in:
Ghostkeeper 2020-05-15 15:04:47 +02:00
parent 0482371fc6
commit 833a7a3804
No known key found for this signature in database
GPG key ID: D2A8871EE34EC59A

View file

@ -150,9 +150,10 @@ class BaseMaterialsModel(ListModel):
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack() global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
if not global_stack.hasMaterials: if not global_stack.hasMaterials:
return # There are no materials for this machine, so nothing to do. return # There are no materials for this machine, so nothing to do.
extruder_stack = global_stack.extruders.get(str(self._extruder_position)) extruder_list = global_stack.extruderList
if not extruder_stack: if self._extruder_position > len(extruder_list):
return return
extruder_stack = extruder_list[self._extruder_position]
nozzle_name = extruder_stack.variant.getName() nozzle_name = extruder_stack.variant.getName()
machine_node = ContainerTree.getInstance().machines[global_stack.definition.getId()] machine_node = ContainerTree.getInstance().machines[global_stack.definition.getId()]
if nozzle_name not in machine_node.variants: if nozzle_name not in machine_node.variants: