mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-13 09:47:50 -06:00
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:
parent
0482371fc6
commit
833a7a3804
1 changed files with 3 additions and 2 deletions
|
@ -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:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue