From e003abf895337c34a7fb2e0090e293af6b7c9429 Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Thu, 15 Jun 2017 14:38:04 +0200 Subject: [PATCH] Only display global quality changes profiles There's one copy for every stack. It doesn't matter which one we take as long as they have the same name. Global is always present, even in single extrusion. Seems the most logical one to display. Contributes to issue CURA-3935. --- cura/Settings/UserProfilesModel.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/cura/Settings/UserProfilesModel.py b/cura/Settings/UserProfilesModel.py index 01b0cdb981..07669422d2 100644 --- a/cura/Settings/UserProfilesModel.py +++ b/cura/Settings/UserProfilesModel.py @@ -1,4 +1,4 @@ -# Copyright (c) 2016 Ultimaker B.V. +# Copyright (c) 2017 Ultimaker B.V. # Cura is released under the terms of the AGPLv3 or higher. from UM.Application import Application @@ -33,4 +33,9 @@ class UserProfilesModel(ProfilesModel): quality_type_set = set([x.getMetaDataEntry("quality_type") for x in quality_list]) filtered_quality_changes = [qc for qc in quality_changes_list if qc.getMetaDataEntry("quality_type") in quality_type_set] + #Only display the global quality changes. + #Otherwise you get multiple copies of every quality changes profile. + #The actual profile switching goes by profile name (not ID), and as long as the names are consistent, switching to any of the profiles will cause all stacks to switch. + filtered_quality_changes = list(filter(lambda quality_changes: quality_changes.getMetaDataEntry("extruder") is None, filtered_quality_changes)) + return filtered_quality_changes