From 6f67e6b55f8af47c2df0b3587903c160cabd414c Mon Sep 17 00:00:00 2001 From: Ghostkeeper Date: Tue, 27 Aug 2019 11:16:00 +0200 Subject: [PATCH] Simplify activeQualityType() and remove dependency on _current_quality_group The shadow administration is annoying so I'm removing it. Contributes to issue CURA-6600. --- cura/Settings/MachineManager.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 10cf2812bb..c3ea9cefbb 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -590,11 +590,10 @@ class MachineManager(QObject): @pyqtProperty(str, notify = activeQualityGroupChanged) def activeQualityType(self) -> str: - quality_type = "" - if self._active_container_stack: - if self._current_quality_group: - quality_type = self._current_quality_group.quality_type - return quality_type + global_stack = CuraApplication.getInstance().getGlobalContainerStack() + if not global_stack: + return "" + return global_stack.quality.getMetaDataEntry("quality_type") @pyqtProperty(bool, notify = activeQualityGroupChanged) def isActiveQualitySupported(self) -> bool: