mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 17:09:08 +08:00
Simplify activeQualityOrQualityChangesName
Removed duplicate fallback mechanism if quality is empty. And removed dependency on shadow administration in _current_quality_group. Contributes to issue CURA-6600.
This commit is contained in:
parent
01796b99cd
commit
78db68369e
@ -1547,12 +1547,10 @@ class MachineManager(QObject):
|
||||
|
||||
@pyqtProperty(str, notify = activeQualityGroupChanged)
|
||||
def activeQualityOrQualityChangesName(self) -> str:
|
||||
name = empty_quality_container.getName()
|
||||
if self._current_quality_changes_group:
|
||||
name = self._current_quality_changes_group.name
|
||||
elif self._current_quality_group:
|
||||
name = self._current_quality_group.name
|
||||
return name
|
||||
global_container_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if global_container_stack.qualityChanges != CuraApplication.getInstance().empty_quality_changes_container:
|
||||
return global_container_stack.qualityChanges.getName()
|
||||
return global_container_stack.quality.getName()
|
||||
|
||||
@pyqtProperty(bool, notify = activeQualityGroupChanged)
|
||||
def hasNotSupportedQuality(self) -> bool:
|
||||
|
Loading…
x
Reference in New Issue
Block a user