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
This commit is contained in:
Jaime van Kessel 2024-04-24 10:34:33 +02:00
parent f98bdd09f7
commit 600cd7669c
No known key found for this signature in database
GPG Key ID: C85F7A3AF1BAA7C4

View File

@ -54,9 +54,7 @@ class ActiveIntentQualitiesModel(ListModel):
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()