mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-25 07:33:57 -06:00
Remove references to quality manager
The last two remaining here. Contributes to issue CURA-6600.
This commit is contained in:
parent
c9191beb61
commit
5a7054ecc3
1 changed files with 5 additions and 7 deletions
|
@ -26,7 +26,6 @@ import cura.CuraApplication # Imported like this to prevent circular references
|
||||||
|
|
||||||
from cura.Machines.ContainerNode import ContainerNode
|
from cura.Machines.ContainerNode import ContainerNode
|
||||||
from cura.Machines.ContainerTree import ContainerTree
|
from cura.Machines.ContainerTree import ContainerTree
|
||||||
from cura.Machines.QualityManager import getMachineDefinitionIDForQualitySearch, QualityManager
|
|
||||||
from cura.Machines.MaterialManager import MaterialManager
|
from cura.Machines.MaterialManager import MaterialManager
|
||||||
|
|
||||||
from cura.PrinterOutput.PrinterOutputDevice import PrinterOutputDevice, ConnectionType
|
from cura.PrinterOutput.PrinterOutputDevice import PrinterOutputDevice, ConnectionType
|
||||||
|
@ -696,9 +695,10 @@ class MachineManager(QObject):
|
||||||
# \returns DefinitionID (string) if found, empty string otherwise
|
# \returns DefinitionID (string) if found, empty string otherwise
|
||||||
@pyqtProperty(str, notify = globalContainerChanged)
|
@pyqtProperty(str, notify = globalContainerChanged)
|
||||||
def activeQualityDefinitionId(self) -> str:
|
def activeQualityDefinitionId(self) -> str:
|
||||||
if self._global_container_stack:
|
global_stack = cura.CuraApplication.CuraApplication.getInstance().getGlobalContainerStack()
|
||||||
return getMachineDefinitionIDForQualitySearch(self._global_container_stack.definition)
|
if not global_stack:
|
||||||
return ""
|
return ""
|
||||||
|
return ContainerTree.getInstance().machines[global_stack.definition.getId()].quality_definition
|
||||||
|
|
||||||
## Gets how the active definition calls variants
|
## Gets how the active definition calls variants
|
||||||
# Caveat: per-definition-variant-title is currently not translated (though the fallback is)
|
# Caveat: per-definition-variant-title is currently not translated (though the fallback is)
|
||||||
|
@ -1468,9 +1468,7 @@ class MachineManager(QObject):
|
||||||
if self._global_container_stack is None:
|
if self._global_container_stack is None:
|
||||||
return
|
return
|
||||||
# Get all the quality groups for this global stack and filter out by quality_type
|
# Get all the quality groups for this global stack and filter out by quality_type
|
||||||
quality_group_dict = self._application.getQualityManager().getQualityGroups(self._global_container_stack)
|
self.setQualityGroup(ContainerTree.getInstance().getCurrentQualityGroups()[quality_type])
|
||||||
quality_group = quality_group_dict[quality_type]
|
|
||||||
self.setQualityGroup(quality_group)
|
|
||||||
|
|
||||||
## Optionally provide global_stack if you want to use your own
|
## Optionally provide global_stack if you want to use your own
|
||||||
# The active global_stack is treated differently.
|
# The active global_stack is treated differently.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue