Implement complete code for currentAvailableIntents

Slightly more complex than the original pseudocode was indicating: It needs to filter on the available quality types first in order to only show the quality types that can be printed with all extruders, but still show the union of all intents for those quality types.

Contributes to issue CURA-6091.
This commit is contained in:
Ghostkeeper 2019-06-20 14:48:18 +02:00
parent c83b9d158b
commit 28e2569c86
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
2 changed files with 16 additions and 8 deletions

View file

@ -194,9 +194,9 @@ class QualityManager(QObject):
return quality_changes_group_dict
#
# Gets all quality groups for the given machine. Both available and none available ones will be included.
# Gets all quality groups for the given machine. Both available and unavailable ones will be included.
# It returns a dictionary with "quality_type"s as keys and "QualityGroup"s as values.
# Whether a QualityGroup is available can be unknown via the field QualityGroup.is_available.
# Whether a QualityGroup is available can be known via the field QualityGroup.is_available.
# For more details, see QualityGroup.
#
def getQualityGroups(self, machine: "GlobalStack") -> Dict[str, QualityGroup]: