Merge pull request #20317 from Ultimaker/CURA-12406_fix_intent_fallback

CURA-12406 fallback to default intent
This commit is contained in:
HellAholic 2025-02-27 11:51:09 +01:00 committed by GitHub
commit ec379e772d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -72,6 +72,13 @@ class ActiveIntentQualitiesModel(ListModel):
new_items.append(intent)
added_quality_type_set.add(intent["quality_type"])
# If there aren't any possibilities when the Intent is kept the same, attempt to set it 'back' to default.
current_quality_type = global_stack.quality.getMetaDataEntry("quality_type")
if len(new_items) == 0 and self._intent_category != "default" and current_quality_type != "not_supported":
IntentManager.getInstance().selectIntent("default", current_quality_type)
self._update()
return
new_items = sorted(new_items, key=lambda x: x["layer_height"])
self.setItems(new_items)