From 4f936f5c2387b4a735aa691b0f570a19c07d0886 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 12 Sep 2019 13:28:59 +0200 Subject: [PATCH] Fix getting active quality changes group from machine manager I have the feeling that we have multiple implementations of this but it's hard to find... Contributes to issue CURA-6600. --- cura/Settings/MachineManager.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 7ec95cb7e5..0c2708943f 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -1573,9 +1573,8 @@ class MachineManager(QObject): global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack() if not global_stack or global_stack.qualityChanges == empty_quality_changes_container: return None - candidate_groups = ContainerTree.getInstance().getCurrentQualityChangesGroups() - for group in candidate_groups: # Match on the container ID of the global stack to find the quality changes group belonging to the active configuration. - if group.node_for_global and group.node_for_global.container_id == global_stack.qualityChanges.getId(): + for group in ContainerTree.getInstance().getCurrentQualityGroups(): # Match on the container ID of the global stack to find the quality changes group belonging to the active configuration. + if group.metadata_for_global and group.metadata_for_global["id"] == global_stack.qualityChanges.getId(): return group return None