From 1d8c2bea989e4c0c04c7b95d7805747f1206c705 Mon Sep 17 00:00:00 2001 From: Lipu Fei Date: Wed, 25 Apr 2018 12:39:39 +0200 Subject: [PATCH] Do not reset quality if the current custom quality is based on not supported CURA-5285 --- cura/Settings/MachineManager.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 453b17dfe5..9651fe190d 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -326,7 +326,7 @@ class MachineManager(QObject): if global_quality_changes.getId() != "empty_quality_changes": quality_changes_groups = self._application.getQualityManager().getQualityChangesGroups(global_stack) new_quality_changes_group = quality_changes_groups.get(global_quality_changes_name) - if new_quality_changes_group is not None and new_quality_changes_group.is_available: + if new_quality_changes_group is not None: self._setQualityChangesGroup(new_quality_changes_group) same_quality_found = True Logger.log("i", "Machine '%s' quality changes set to '%s'", @@ -1141,13 +1141,15 @@ class MachineManager(QObject): Logger.log("d", "Current quality type = [%s]", current_quality_type) if not self.activeMaterialsCompatible(): - Logger.log("i", "Active materials are not compatible, setting all qualities to empty (Not Supported).") - self._setEmptyQuality() + if current_quality_type is not None: + Logger.log("i", "Active materials are not compatible, setting all qualities to empty (Not Supported).") + self._setEmptyQuality() return if not available_quality_types: - Logger.log("i", "No available quality types found, setting all qualities to empty (Not Supported).") - self._setEmptyQuality() + if self._current_quality_changes_group is None: + Logger.log("i", "No available quality types found, setting all qualities to empty (Not Supported).") + self._setEmptyQuality() return if current_quality_type in available_quality_types: