Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/cura/UI
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2020-06-02 12:48:11 +0300
committerGhostkeeper <rubend@tutanota.com>2020-06-02 12:54:10 +0300
commit19f500834b20b167fc3e172c3193eb2235cfadb3 (patch)
tree264213cdf4b2bb709c0c62339375f704325ed379 /cura/UI
parentf1d3c2272eaa60bb7cdb825670e1b6af63dd0c3d (diff)
Remove use of deprecated extruders property
Still had this one uncommitted from last Friday. I tested it and it works the same way.
Diffstat (limited to 'cura/UI')
-rw-r--r--cura/UI/MachineSettingsManager.py6
1 files changed, 2 insertions, 4 deletions
diff --git a/cura/UI/MachineSettingsManager.py b/cura/UI/MachineSettingsManager.py
index 671bb0ece0..1d2604c3c9 100644
--- a/cura/UI/MachineSettingsManager.py
+++ b/cura/UI/MachineSettingsManager.py
@@ -60,7 +60,6 @@ class MachineSettingsManager(QObject):
# In other words: only continue for the UM2 (extended), but not for the UM2+
return
- extruder_positions = list(global_stack.extruders.keys())
has_materials = global_stack.getProperty("machine_gcode_flavor", "value") != "UltiGCode"
material_node = None
@@ -73,12 +72,11 @@ class MachineSettingsManager(QObject):
global_stack.removeMetaDataEntry("has_materials")
# set materials
- for position in extruder_positions:
+ for position, extruder in enumerate(global_stack.extruderList):
if has_materials:
- extruder = global_stack.extruderList[int(position)]
approximate_diameter = extruder.getApproximateMaterialDiameter()
variant_node = ContainerTree.getInstance().machines[global_stack.definition.getId()].variants[extruder.variant.getName()]
material_node = variant_node.preferredMaterial(approximate_diameter)
- machine_manager.setMaterial(position, material_node)
+ machine_manager.setMaterial(str(position), material_node)
self.forceUpdate()