Simplify activeQualityType() and remove dependency on _current_quality_group

The shadow administration is annoying so I'm removing it.

Contributes to issue CURA-6600.
This commit is contained in:
Ghostkeeper 2019-08-27 11:16:00 +02:00
parent 84c6ec36dc
commit 6f67e6b55f
No known key found for this signature in database
GPG key ID: 86BEF881AE2CF276

View file

@ -590,11 +590,10 @@ class MachineManager(QObject):
@pyqtProperty(str, notify = activeQualityGroupChanged) @pyqtProperty(str, notify = activeQualityGroupChanged)
def activeQualityType(self) -> str: def activeQualityType(self) -> str:
quality_type = "" global_stack = CuraApplication.getInstance().getGlobalContainerStack()
if self._active_container_stack: if not global_stack:
if self._current_quality_group: return ""
quality_type = self._current_quality_group.quality_type return global_stack.quality.getMetaDataEntry("quality_type")
return quality_type
@pyqtProperty(bool, notify = activeQualityGroupChanged) @pyqtProperty(bool, notify = activeQualityGroupChanged)
def isActiveQualitySupported(self) -> bool: def isActiveQualitySupported(self) -> bool: