mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-06-26 01:15:28 -06:00
Prevent crash when the quality-type is _actually_ not supported.
part of CURA-12406
This commit is contained in:
parent
beac50d44f
commit
4e7807b0fc
1 changed files with 4 additions and 3 deletions
|
@ -72,9 +72,10 @@ 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, set it 'back' to default.
|
||||
if len(new_items) == 0 and self._intent_category != "default":
|
||||
IntentManager.getInstance().selectIntent("default", global_stack.quality.getMetaDataEntry("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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue