mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-21 21:58:01 -06:00
Also show warning icon when the set-up on other extruders is unsupported
So I added a function that checks the support on all extruders and the global stack. Contributes to issue CURA-4148.
This commit is contained in:
parent
165665247f
commit
585c04dfaa
2 changed files with 18 additions and 1 deletions
|
@ -659,6 +659,23 @@ class MachineManager(QObject):
|
||||||
return Util.parseBool(quality.getMetaDataEntry("supported", True))
|
return Util.parseBool(quality.getMetaDataEntry("supported", True))
|
||||||
return False
|
return False
|
||||||
|
|
||||||
|
## Returns whether there is anything unsupported in the current set-up.
|
||||||
|
#
|
||||||
|
# The current set-up signifies the global stack and all extruder stacks,
|
||||||
|
# so this indicates whether there is any container in any of the container
|
||||||
|
# stacks that is not marked as supported.
|
||||||
|
@pyqtProperty(bool, notify = activeQualityChanged)
|
||||||
|
def isCurrentSetupSupported(self) -> bool:
|
||||||
|
if not self._global_container_stack:
|
||||||
|
return False
|
||||||
|
for stack in [self._global_container_stack] + list(self._global_container_stack.extruders.values()):
|
||||||
|
for container in stack.getContainers():
|
||||||
|
if not container:
|
||||||
|
return False
|
||||||
|
if not Util.parseBool(container.getMetaDataEntry("supported", True)):
|
||||||
|
return False
|
||||||
|
return True
|
||||||
|
|
||||||
## Get the Quality ID associated with the currently active extruder
|
## Get the Quality ID associated with the currently active extruder
|
||||||
# Note that this only returns the "quality", not the "quality_changes"
|
# Note that this only returns the "quality", not the "quality_changes"
|
||||||
# \returns QualityID (string) if found, empty string otherwise
|
# \returns QualityID (string) if found, empty string otherwise
|
||||||
|
|
|
@ -327,7 +327,7 @@ Column
|
||||||
//sourceSize.height: width + 5
|
//sourceSize.height: width + 5
|
||||||
|
|
||||||
color: UM.Theme.getColor("setting_validation_warning")
|
color: UM.Theme.getColor("setting_validation_warning")
|
||||||
visible: !Cura.MachineManager.isActiveQualitySupported
|
visible: !Cura.MachineManager.isCurrentSetupSupported
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue