mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Select correctly "inherited" profile when switching to a material that has no qualities of its own
CURA-2095
This commit is contained in:
parent
8df5bba6e9
commit
043343d536
1 changed files with 6 additions and 3 deletions
|
@ -809,10 +809,13 @@ class MachineManager(QObject):
|
||||||
# If a quality for this specific material cannot be found, try finding qualities for a generic version of the material
|
# If a quality for this specific material cannot be found, try finding qualities for a generic version of the material
|
||||||
material_search_criteria = { "type": "material", "material": material_container.getMetaDataEntry("material"), "color_name": "Generic" }
|
material_search_criteria = { "type": "material", "material": material_container.getMetaDataEntry("material"), "color_name": "Generic" }
|
||||||
if definition.getMetaDataEntry("has_machine_quality"):
|
if definition.getMetaDataEntry("has_machine_quality"):
|
||||||
material_search_criteria["definition"] = definition.id
|
if material_container:
|
||||||
|
material_search_criteria["definition"] = material_container.getDefinition().id
|
||||||
|
else:
|
||||||
|
material_search_criteria["definition"] = definition.id
|
||||||
|
|
||||||
if definition.getMetaDataEntry("has_variants") and variant_container:
|
if definition.getMetaDataEntry("has_variants") and variant_container:
|
||||||
material_search_criteria["variant"] = variant_container.id
|
material_search_criteria["variant"] = variant_container.id
|
||||||
else:
|
else:
|
||||||
material_search_criteria["definition"] = "fdmprinter"
|
material_search_criteria["definition"] = "fdmprinter"
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue