|
@@ -1357,11 +1357,7 @@ class MachineManager(QObject):
|
|
|
# If we can keep the current material after the switch, try to do so.
|
|
|
nozzle_node = ContainerTree.getInstance().machines[self._global_container_stack.definition.getId()].variants[current_nozzle_name]
|
|
|
candidate_materials = nozzle_node.materials
|
|
|
- old_approximate_material_diameter = None # type: Optional[float]
|
|
|
- if candidate_materials:
|
|
|
- candidate_material = list(candidate_materials.values())[0]
|
|
|
- default_material_diameter = "2.85"
|
|
|
- old_approximate_material_diameter = int(round(float(candidate_material.container.getMetaDataEntry("properties/diameter", default_material_diameter))))
|
|
|
+ old_approximate_material_diameter = int(extruder.material.getMetaDataEntry("approximate_diameter", default = 3))
|
|
|
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
|