mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-24 07:03:56 -06:00
Use getApproximateMaterialDiameter instead of rounded getCompatibleMaterialDiameter
So we don't need to round it again. Also convert both to float to be robust against the ambiguous serialisation of floats getting in the way (e.g. '3' vs. '3.0'). Python does that sometimes. Contributes to issue CURA-6600.
This commit is contained in:
parent
eaf649023a
commit
614c2970ea
1 changed files with 2 additions and 2 deletions
|
@ -131,8 +131,8 @@ class MaterialManager(QObject):
|
|||
|
||||
# Fetch the available materials (ContainerNode) for the current active machine and extruder setup.
|
||||
materials = self.getAvailableMaterials(machine.definition.getId(), nozzle_name)
|
||||
compatible_material_diameter = str(round(extruder_stack.getCompatibleMaterialDiameter()))
|
||||
result = {key: material for key, material in materials.items() if material.container and material.container.getMetaDataEntry("approximate_diameter") == compatible_material_diameter}
|
||||
compatible_material_diameter = extruder_stack.getApproximateMaterialDiameter()
|
||||
result = {key: material for key, material in materials.items() if material.container and float(material.container.getMetaDataEntry("approximate_diameter")) == compatible_material_diameter}
|
||||
return result
|
||||
|
||||
#
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue