mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06: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
1 changed files with 2 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue