mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-19 19:09:09 +08:00
Also show the "unsupported" warning when a custom profile is selected
...by making sure we're looking at the quality container (not quality_changes) of the active extruder/stack CURA-2271
This commit is contained in:
parent
95fabbaf6d
commit
34630fa646
@ -492,6 +492,21 @@ class MachineManager(QObject):
|
||||
return quality.getMetaDataEntry("quality_type")
|
||||
return ""
|
||||
|
||||
## Get the Quality ID associated with the currently active extruder
|
||||
# Note that this only returns the "quality", not the "quality_changes"
|
||||
# \returns QualityID (string) if found, empty string otherwise
|
||||
# \sa activeQualityId()
|
||||
# \todo Ideally, this method would be named activeQualityId(), and the other one
|
||||
# would be named something like activeQualityOrQualityChanges() for consistency
|
||||
@pyqtProperty(str, notify = activeQualityChanged)
|
||||
def activeQualityContainerId(self):
|
||||
# We're using the active stack instead of the global stack in case the list of qualities differs per extruder
|
||||
if self._active_container_stack:
|
||||
quality = self._active_container_stack.findContainer(type = "quality")
|
||||
if quality:
|
||||
return quality.getId()
|
||||
return ""
|
||||
|
||||
@pyqtProperty(str, notify = activeQualityChanged)
|
||||
def activeQualityChangesId(self):
|
||||
if self._global_container_stack:
|
||||
|
@ -244,7 +244,7 @@ Column
|
||||
}
|
||||
|
||||
}
|
||||
property var valueWarning: Cura.MachineManager.activeQualityId == "empty_quality"
|
||||
property var valueWarning: Cura.MachineManager.activeQualityContainerId == "empty_quality"
|
||||
|
||||
enabled: !extrudersList.visible || base.currentExtruderIndex > -1
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user