From 600cd7669c6d59bf16698b1c38c0969ffea26181 Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 24 Apr 2024 10:34:33 +0200 Subject: [PATCH] Use the activeIntent from intentmanager instead of active stack Otherwise the behavior of the model changes depending on what stack you have active. I think that this was caused by some code duplication where one copy of the code was updated but not the other one. This bug was here for quite some time, but strangely enough, it was never found... CURA-11854 --- cura/Machines/Models/ActiveIntentQualitiesModel.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/cura/Machines/Models/ActiveIntentQualitiesModel.py b/cura/Machines/Models/ActiveIntentQualitiesModel.py index 2e13f7dbcb8..906662d133e 100644 --- a/cura/Machines/Models/ActiveIntentQualitiesModel.py +++ b/cura/Machines/Models/ActiveIntentQualitiesModel.py @@ -54,9 +54,7 @@ def _onChanged(self, container: ContainerStack) -> None: self._updateDelayed() def _update(self): - active_extruder_stack = cura.CuraApplication.CuraApplication.getInstance().getMachineManager().activeStack - if active_extruder_stack: - self._intent_category = active_extruder_stack.intent.getMetaDataEntry("intent_category", "") + self._intent_category = IntentManager.getInstance().currentIntentCategory new_items: List[Dict[str, Any]] = [] global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()