Fix handling quality_changes_group by metadata

We only need to access the metadata so this is fine.

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-08-28 14:07:49 +02:00
parent 7c90b5dd30
commit 619adcb5b3
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -1121,11 +1121,9 @@ class MachineManager(QObject):
self.activeQualityChangesGroupChanged.emit()
def _fixQualityChangesGroupToNotSupported(self, quality_changes_group: "QualityChangesGroup") -> None:
nodes = [quality_changes_group.node_for_global] + list(quality_changes_group.nodes_for_extruders.values())
containers = [n.container for n in nodes if n is not None]
for container in containers:
if container:
container.setMetaDataEntry("quality_type", "not_supported")
metadatas = [quality_changes_group.metadata_for_global] + list(quality_changes_group.metadata_per_extruder.values())
for metadata in metadatas:
metadata["quality_type"] = "not_supported" # This actually changes the metadata of the container since they are stored by reference!
quality_changes_group.quality_type = "not_supported"
quality_changes_group.intent_category = "default"