mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-15 02:37:49 -06:00
Set quality profiles to preferred quality upon stack creation
A good default. Possible bug: If there are multiple matching quality profiles but the preferred quality profiles matches none or multiple of them, a random one is chosen. The random profile for the global stack may not match the random one for the extruder? Contributes to issue CURA-6600.
This commit is contained in:
parent
fcab800a8d
commit
8f34b3dd73
2 changed files with 21 additions and 33 deletions
|
@ -136,6 +136,15 @@ class MachineNode(ContainerNode):
|
|||
|
||||
return list(groups_by_name.values())
|
||||
|
||||
## Gets the preferred global quality node, going by the preferred quality
|
||||
# type.
|
||||
#
|
||||
# If the preferred global quality is not in there, an arbitrary global
|
||||
# quality is taken.
|
||||
# If there are no global qualities, an empty quality is returned.
|
||||
def preferredGlobalQuality(self) -> QualityNode:
|
||||
return self.global_qualities.get(self.preferred_quality_type, next(iter(self.global_qualities)))
|
||||
|
||||
## (Re)loads all variants under this printer.
|
||||
def _loadAll(self):
|
||||
container_registry = ContainerRegistry.getInstance()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue