mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-06-30 19:45:15 +08:00
Remove use of deprecated extruders property
Still had this one uncommitted from last Friday. I tested it and it works the same way.
This commit is contained in:
parent
f1d3c2272e
commit
19f500834b
@ -60,7 +60,6 @@ class MachineSettingsManager(QObject):
|
|||||||
# In other words: only continue for the UM2 (extended), but not for the UM2+
|
# In other words: only continue for the UM2 (extended), but not for the UM2+
|
||||||
return
|
return
|
||||||
|
|
||||||
extruder_positions = list(global_stack.extruders.keys())
|
|
||||||
has_materials = global_stack.getProperty("machine_gcode_flavor", "value") != "UltiGCode"
|
has_materials = global_stack.getProperty("machine_gcode_flavor", "value") != "UltiGCode"
|
||||||
|
|
||||||
material_node = None
|
material_node = None
|
||||||
@ -73,12 +72,11 @@ class MachineSettingsManager(QObject):
|
|||||||
global_stack.removeMetaDataEntry("has_materials")
|
global_stack.removeMetaDataEntry("has_materials")
|
||||||
|
|
||||||
# set materials
|
# set materials
|
||||||
for position in extruder_positions:
|
for position, extruder in enumerate(global_stack.extruderList):
|
||||||
if has_materials:
|
if has_materials:
|
||||||
extruder = global_stack.extruderList[int(position)]
|
|
||||||
approximate_diameter = extruder.getApproximateMaterialDiameter()
|
approximate_diameter = extruder.getApproximateMaterialDiameter()
|
||||||
variant_node = ContainerTree.getInstance().machines[global_stack.definition.getId()].variants[extruder.variant.getName()]
|
variant_node = ContainerTree.getInstance().machines[global_stack.definition.getId()].variants[extruder.variant.getName()]
|
||||||
material_node = variant_node.preferredMaterial(approximate_diameter)
|
material_node = variant_node.preferredMaterial(approximate_diameter)
|
||||||
machine_manager.setMaterial(position, material_node)
|
machine_manager.setMaterial(str(position), material_node)
|
||||||
|
|
||||||
self.forceUpdate()
|
self.forceUpdate()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user