mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-11 00:37:50 -06: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
1 changed files with 1 additions and 3 deletions
|
@ -117,9 +117,7 @@ class BaseMaterialsModel(ListModel):
|
||||||
# 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.
|
||||||
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
||||||
extruder_stack = global_stack.extruders[str(self._extruder_position)]
|
extruder_stack = global_stack.extruders[str(self._extruder_position)]
|
||||||
nozzle_name = None
|
nozzle_name = extruder_stack.variant.getName()
|
||||||
if extruder_stack.variant.getId() != "empty_variant":
|
|
||||||
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()))
|
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}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue