mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-18 12:17:50 -06: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
1 changed files with 4 additions and 6 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue