mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 14:34:01 -06:00
Fix for-loop in updateMaterialWithVariant
CURA-6821
This commit is contained in:
parent
55a5464ed3
commit
51c96aecde
1 changed files with 2 additions and 2 deletions
|
@ -1355,7 +1355,7 @@ class MachineManager(QObject):
|
|||
if candidate_materials:
|
||||
candidate_material = list(candidate_materials.values())[0]
|
||||
old_approximate_material_diameter = int(round(float(candidate_material.diameter)))
|
||||
new_approximate_material_diameter = int(self._global_container_stack.extruderList[int(position)].getApproximateMaterialDiameter())
|
||||
new_approximate_material_diameter = int(self._global_container_stack.extruderList[int(position_item)].getApproximateMaterialDiameter())
|
||||
|
||||
# Only switch to the old candidate material if the approximate material diameter of the extruder stays the
|
||||
# same.
|
||||
|
@ -1366,7 +1366,7 @@ class MachineManager(QObject):
|
|||
else:
|
||||
# The current material is not available, find the preferred one.
|
||||
if position is not None:
|
||||
approximate_material_diameter = int(self._global_container_stack.extruderList[int(position)].getApproximateMaterialDiameter())
|
||||
approximate_material_diameter = int(self._global_container_stack.extruderList[int(position_item)].getApproximateMaterialDiameter())
|
||||
material_node = nozzle_node.preferredMaterial(approximate_material_diameter)
|
||||
self._setMaterial(position_item, material_node)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue