mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:48:59 +08:00
Made checking if inheritance is allowed more explicit
CURA-2108
This commit is contained in:
parent
32b9d20647
commit
2c8b9290f8
@ -838,6 +838,9 @@ class MachineManager(QObject):
|
|||||||
# that are assigned to the parents of this material profile.
|
# that are assigned to the parents of this material profile.
|
||||||
try:
|
try:
|
||||||
inherited_files = material_container.getInheritedFiles()
|
inherited_files = material_container.getInheritedFiles()
|
||||||
|
except AttributeError: # Material_container does not support inheritance.
|
||||||
|
inherited_files = []
|
||||||
|
|
||||||
if inherited_files:
|
if inherited_files:
|
||||||
for inherited_file in inherited_files:
|
for inherited_file in inherited_files:
|
||||||
# Extract the ID from the path we used to load the file.
|
# Extract the ID from the path we used to load the file.
|
||||||
@ -845,8 +848,6 @@ class MachineManager(QObject):
|
|||||||
containers = container_registry.findInstanceContainers(**search_criteria)
|
containers = container_registry.findInstanceContainers(**search_criteria)
|
||||||
if containers:
|
if containers:
|
||||||
return containers[0]
|
return containers[0]
|
||||||
except AttributeError: # Material_container does not support inheritance.
|
|
||||||
pass
|
|
||||||
|
|
||||||
# We still weren't able to find a quality for this specific material.
|
# We still weren't able to find a quality for this specific material.
|
||||||
# Try to find qualities for a generic version of the material.
|
# Try to find qualities for a generic version of the material.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user