Select correct intent when quality_changes has an intent category

This commit is contained in:
Jaime van Kessel 2019-09-30 12:55:10 +02:00
parent 45f3b6eeb2
commit 916bb5a32b
No known key found for this signature in database
GPG Key ID: 3710727397403C91

View File

@ -1316,6 +1316,13 @@ class MachineManager(QObject):
if not extruder.isEnabled:
continue
current_category = extruder.intent.getMetaDataEntry("intent_category", "default")
if current_category != "default" and current_category != category:
category = current_category
continue
# It's also possible that the qualityChanges has an opinion about the intent_category.
# This is in the case that a QC was made on an intent, but none of the materials have that intent.
# If the user switches back, we do want the intent to be selected again.
current_category = extruder.qualityChanges.getMetaDataEntry("intent_category", "default")
if current_category != "default" and current_category != category:
category = current_category
self.setIntentByCategory(category)