Use container tree instead of getMachineDefinitionIdForQualitySearch

It's in the metadata there, so use it.

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-08-28 13:21:23 +02:00
parent 5a7054ecc3
commit 6dd0333626
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -381,7 +381,8 @@ class CuraContainerRegistry(ContainerRegistry):
global_stack = Application.getInstance().getGlobalContainerStack()
if global_stack is None:
return None
definition_id = getMachineDefinitionIDForQualitySearch(global_stack.definition)
machine_node = ContainerTree.getInstance().machines[global_stack.definition.getId()]
definition_id = machine_node.quality_definition
profile.setDefinition(definition_id)
# Check to make sure the imported profile actually makes sense in context of the current configuration.