mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-23 14:44:13 -06:00
Fix quality changes that are based on no-long-available quality_type
CURA-5218
This commit is contained in:
parent
8d3c3c0e80
commit
1c4c3a4a0b
1 changed files with 9 additions and 0 deletions
|
@ -1016,6 +1016,13 @@ class MachineManager(QObject):
|
||||||
self.activeQualityGroupChanged.emit()
|
self.activeQualityGroupChanged.emit()
|
||||||
self.activeQualityChangesGroupChanged.emit()
|
self.activeQualityChangesGroupChanged.emit()
|
||||||
|
|
||||||
|
def _fixQualityChangesGroupToNotSupported(self, quality_changes_group):
|
||||||
|
nodes = [quality_changes_group.node_for_global] + list(quality_changes_group.nodes_for_extruders.values())
|
||||||
|
containers = [n.getContainer() for n in nodes if n is not None]
|
||||||
|
for container in containers:
|
||||||
|
container.setMetaDataEntry("quality_type", "not_supported")
|
||||||
|
quality_changes_group.quality_type = "not_supported"
|
||||||
|
|
||||||
def _setQualityChangesGroup(self, quality_changes_group):
|
def _setQualityChangesGroup(self, quality_changes_group):
|
||||||
quality_type = quality_changes_group.quality_type
|
quality_type = quality_changes_group.quality_type
|
||||||
# A custom quality can be created based on "not supported".
|
# A custom quality can be created based on "not supported".
|
||||||
|
@ -1024,6 +1031,8 @@ class MachineManager(QObject):
|
||||||
if quality_type != "not_supported":
|
if quality_type != "not_supported":
|
||||||
quality_group_dict = self._quality_manager.getQualityGroups(self._global_container_stack)
|
quality_group_dict = self._quality_manager.getQualityGroups(self._global_container_stack)
|
||||||
quality_group = quality_group_dict.get(quality_type)
|
quality_group = quality_group_dict.get(quality_type)
|
||||||
|
if quality_group is None:
|
||||||
|
self._fixQualityChangesGroupToNotSupported(quality_changes_group)
|
||||||
|
|
||||||
quality_changes_container = self._empty_quality_changes_container
|
quality_changes_container = self._empty_quality_changes_container
|
||||||
if quality_changes_group.node_for_global:
|
if quality_changes_group.node_for_global:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue