From e2fd90506a2720c02d0d344c43e88e3dc73d38ca Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 9 Jul 2019 10:56:11 +0200 Subject: [PATCH] Include intent profiles from the default intents If we have the default intent category, list all quality types available. Contributes to issue CURA-6597. --- cura/Machines/Models/IntentModel.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/cura/Machines/Models/IntentModel.py b/cura/Machines/Models/IntentModel.py index f4ed6e8206..61fa14936e 100644 --- a/cura/Machines/Models/IntentModel.py +++ b/cura/Machines/Models/IntentModel.py @@ -51,9 +51,13 @@ class IntentModel(ListModel): if not global_stack: self.setItems(new_items) return + quality_groups = quality_manager.getQualityGroups(global_stack) for intent_category, quality_type in IntentManager.getInstance().currentAvailableIntents(): if intent_category == self._intent_category: - new_items.append({"name": quality_manager.getQualityGroups(global_stack)[quality_type].name, "quality_type": quality_type}) + new_items.append({"name": quality_groups[quality_type].name, "quality_type": quality_type}) + if self._intent_category == "default": #For Default we always list all quality types. We can't filter on available profiles since the empty intent is not a specific quality type. + for quality_type in quality_groups.keys(): + new_items.append({"name": quality_groups[quality_type].name, "quality_type": quality_type}) self.setItems(new_items)