mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-15 20:26:03 +08:00
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:
parent
84c6ec36dc
commit
6f67e6b55f
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user