Store intent category in metadata of quality_changes as well

This is necessary in order to restore it properly.

Contributes to issue CURA_6600.
This commit is contained in:
Ghostkeeper 2019-09-11 16:58:11 +02:00
parent f6089ed627
commit 2b96543cd3
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276
6 changed files with 26 additions and 8 deletions

View file

@ -131,6 +131,8 @@ class GCodeWriter(MeshWriter):
container_with_profile.setName(quality_name)
container_with_profile.setMetaDataEntry("type", "quality_changes")
container_with_profile.setMetaDataEntry("quality_type", quality_type)
if stack.getMetaDataEntry("position") is not None: # For extruder stacks, the quality changes should include an intent category.
container_with_profile.setMetaDataEntry("intent_category", stack.intent.getMetaDataEntry("intent_category", "default"))
container_with_profile.setDefinition(machine_definition_id_for_quality)
flat_global_container = self._createFlattenedContainerInstance(stack.userChanges, container_with_profile)