mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 12:49:10 +08:00
Use getApproximateMaterialDiameter instead of rounded getCompatibleMaterialDiameter
There was a function to round it for us already. Contributes to issue CURA-6600.
This commit is contained in:
parent
37d54071f0
commit
5f4051ab5c
@ -127,8 +127,8 @@ class BaseMaterialsModel(ListModel):
|
|||||||
return
|
return
|
||||||
nozzle_name = extruder_stack.variant.getName()
|
nozzle_name = extruder_stack.variant.getName()
|
||||||
materials = ContainerTree.getInstance().machines[global_stack.definition.getId()].variants[nozzle_name].materials
|
materials = ContainerTree.getInstance().machines[global_stack.definition.getId()].variants[nozzle_name].materials
|
||||||
compatible_material_diameter = str(round(extruder_stack.getCompatibleMaterialDiameter()))
|
approximate_material_diameter = extruder_stack.getApproximateMaterialDiameter()
|
||||||
self._available_materials = {key: material for key, material in materials.items() if material.container.getMetaDataEntry("approximate_diameter") == compatible_material_diameter}
|
self._available_materials = {key: material for key, material in materials.items() if float(material.container.getMetaDataEntry("approximate_diameter")) == approximate_material_diameter}
|
||||||
|
|
||||||
## This method is used by all material models in the beginning of the
|
## This method is used by all material models in the beginning of the
|
||||||
# _update() method in order to prevent errors. It's the same in all models
|
# _update() method in order to prevent errors. It's the same in all models
|
||||||
|
Loading…
x
Reference in New Issue
Block a user