mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 13:03:59 -06:00
Get old diameter from old material instead of new candidate.
part of CURA-6821
This commit is contained in:
parent
649ca99fe0
commit
784396424c
1 changed files with 1 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue