mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 12:29:02 +08:00
Fix switching to printers without variant
Since the 'empty_variant' nozzle is now just in the tree, this check is no longer even necessary. Contributes to issue CURA-6600.
This commit is contained in:
parent
4fb656ea7b
commit
1febfde3cc
@ -117,9 +117,7 @@ class BaseMaterialsModel(ListModel):
|
||||
# Update the available materials (ContainerNode) for the current active machine and extruder setup.
|
||||
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
||||
extruder_stack = global_stack.extruders[str(self._extruder_position)]
|
||||
nozzle_name = None
|
||||
if extruder_stack.variant.getId() != "empty_variant":
|
||||
nozzle_name = extruder_stack.variant.getName()
|
||||
nozzle_name = extruder_stack.variant.getName()
|
||||
materials = ContainerTree.getInstance().machines[global_stack.definition.getId()].variants[nozzle_name].materials
|
||||
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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user