mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Use ContainerTree structure to get quality groups
Contributes to issue CURA-6600.
This commit is contained in:
parent
9bcd3d8c1e
commit
606bef9b5f
1 changed files with 3 additions and 1 deletions
|
@ -4,6 +4,7 @@
|
|||
from PyQt5.QtCore import QObject, pyqtProperty, pyqtSignal, pyqtSlot
|
||||
from typing import Any, Dict, List, Optional, Set, Tuple, TYPE_CHECKING
|
||||
import cura.CuraApplication
|
||||
from cura.Machines.ContainerTree import ContainerTree
|
||||
from cura.Settings.cura_empty_instance_containers import empty_intent_container
|
||||
from UM.Settings.InstanceContainer import InstanceContainer
|
||||
|
||||
|
@ -75,7 +76,8 @@ class IntentManager(QObject):
|
|||
# TODO: We now do this (return a default) if the global stack is missing, but not in the code below,
|
||||
# even though there should always be defaults. The problem then is what to do with the quality_types.
|
||||
# Currently _also_ inconsistent with 'currentAvailableIntentCategories', which _does_ return default.
|
||||
quality_groups = application.getQualityManager().getQualityGroups(global_stack)
|
||||
quality_groups = ContainerTree.getInstance().getCurrentQualityGroups()
|
||||
# TODO: These quality nodes in that tree already contain the intent nodes. We can optimise this.
|
||||
available_quality_types = {quality_group.quality_type for quality_group in quality_groups.values() if quality_group.node_for_global is not None}
|
||||
|
||||
final_intent_ids = set() # type: Set[str]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue