Do not reset quality if the current custom quality is based on not supported

CURA-5285
This commit is contained in:
Lipu Fei 2018-04-25 12:39:39 +02:00
parent 491e0c83ba
commit 1d8c2bea98

View file

@ -326,7 +326,7 @@ class MachineManager(QObject):
if global_quality_changes.getId() != "empty_quality_changes": if global_quality_changes.getId() != "empty_quality_changes":
quality_changes_groups = self._application.getQualityManager().getQualityChangesGroups(global_stack) quality_changes_groups = self._application.getQualityManager().getQualityChangesGroups(global_stack)
new_quality_changes_group = quality_changes_groups.get(global_quality_changes_name) 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) self._setQualityChangesGroup(new_quality_changes_group)
same_quality_found = True same_quality_found = True
Logger.log("i", "Machine '%s' quality changes set to '%s'", Logger.log("i", "Machine '%s' quality changes set to '%s'",
@ -1141,11 +1141,13 @@ class MachineManager(QObject):
Logger.log("d", "Current quality type = [%s]", current_quality_type) Logger.log("d", "Current quality type = [%s]", current_quality_type)
if not self.activeMaterialsCompatible(): if not self.activeMaterialsCompatible():
if current_quality_type is not None:
Logger.log("i", "Active materials are not compatible, setting all qualities to empty (Not Supported).") Logger.log("i", "Active materials are not compatible, setting all qualities to empty (Not Supported).")
self._setEmptyQuality() self._setEmptyQuality()
return return
if not available_quality_types: if not available_quality_types:
if self._current_quality_changes_group is None:
Logger.log("i", "No available quality types found, setting all qualities to empty (Not Supported).") Logger.log("i", "No available quality types found, setting all qualities to empty (Not Supported).")
self._setEmptyQuality() self._setEmptyQuality()
return return