mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 01:55:56 +08:00
Fix getting available materials without material manager
It's a bit weird still that this is executed in the _canUpdate... Oh well. Contributes to issue CURA-6600.
This commit is contained in:
parent
4ad6f4f635
commit
5d76f96354
@ -131,7 +131,7 @@ class BaseMaterialsModel(ListModel):
|
|||||||
nozzle_name = extruder_stack.variant.getName()
|
nozzle_name = extruder_stack.variant.getName()
|
||||||
|
|
||||||
# Update the available materials (ContainerNode) for the current active machine and extruder setup.
|
# Update the available materials (ContainerNode) for the current active machine and extruder setup.
|
||||||
materials = self.getAvailableMaterials(global_stack.definition.getId(), nozzle_name)
|
materials = ContainerTree.getInstance().machines[global_stack.definition.getId()].variants[nozzle_name].materials
|
||||||
compatible_material_diameter = str(round(extruder_stack.getCompatibleMaterialDiameter()))
|
compatible_material_diameter = str(round(extruder_stack.getCompatibleMaterialDiameter()))
|
||||||
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 material.container.getMetaDataEntry("approximate_diameter") == compatible_material_diameter}
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user