From 8d3c3c0e8079efe72d2328711aa7fc3361a6a911 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Thu, 12 Apr 2018 13:46:52 +0200 Subject: [PATCH] Fix the case that a quality_type is not available CURA-5218 --- cura/Settings/MachineManager.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 21810d394c..1272e043c4 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -1020,11 +1020,10 @@ class MachineManager(QObject): quality_type = quality_changes_group.quality_type # A custom quality can be created based on "not supported". # In that case, do not set quality containers to empty. - if quality_type == "not_supported": - quality_group = None - else: + quality_group = None + if quality_type != "not_supported": quality_group_dict = self._quality_manager.getQualityGroups(self._global_container_stack) - quality_group = quality_group_dict[quality_type] + quality_group = quality_group_dict.get(quality_type) quality_changes_container = self._empty_quality_changes_container if quality_changes_group.node_for_global: