Ensure that materials get filtered by diameter again

CURA-6600
This commit is contained in:
Jaime van Kessel 2019-08-19 14:10:36 +02:00
parent d29b3078b3
commit 4ff8991196

View File

@ -109,7 +109,10 @@ class MaterialManager(QObject):
nozzle_name = extruder_stack.variant.getName()
# Fetch the available materials (ContainerNode) for the current active machine and extruder setup.
return self.getAvailableMaterials(machine.definition.getId(), nozzle_name)
materials =self.getAvailableMaterials(machine.definition.getId(), nozzle_name)
compatible_material_diameter = str(round(extruder_stack.getCompatibleMaterialDiameter()))
return {key: material for key, material in materials.items() if material.getMetaDataEntry("approximate_diameter") == compatible_material_diameter}
#
# Gets MaterialNode for the given extruder and machine with the given material name.