mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-14 18:27:51 -06:00
CURA-4602 Fixed active custom profile selected check
This commit is contained in:
parent
a7a3ba9500
commit
3b5ed70113
1 changed files with 9 additions and 2 deletions
|
@ -621,9 +621,16 @@ class MachineManager(QObject):
|
||||||
def activeQualityId(self) -> str:
|
def activeQualityId(self) -> str:
|
||||||
if self._active_container_stack:
|
if self._active_container_stack:
|
||||||
quality = self._active_container_stack.quality
|
quality = self._active_container_stack.quality
|
||||||
|
if isinstance(quality, type(self._empty_quality_container)):
|
||||||
|
return ""
|
||||||
quality_changes = self._active_container_stack.qualityChanges
|
quality_changes = self._active_container_stack.qualityChanges
|
||||||
if quality and quality_changes and isinstance(quality_changes, type(self._empty_quality_changes_container)) and not isinstance(quality, type(self._empty_quality_container)):
|
if quality and quality_changes:
|
||||||
return quality.getId()
|
if isinstance(quality_changes, type(self._empty_quality_changes_container)):
|
||||||
|
# It's a built-in profile
|
||||||
|
return quality.getId()
|
||||||
|
else:
|
||||||
|
# Custom profile
|
||||||
|
return quality_changes.getId()
|
||||||
return ""
|
return ""
|
||||||
|
|
||||||
@pyqtProperty(str, notify=activeQualityChanged)
|
@pyqtProperty(str, notify=activeQualityChanged)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue