diff --git a/cura/Settings/CuraContainerStack.py b/cura/Settings/CuraContainerStack.py index c141ac9b0e..1455e140a8 100755 --- a/cura/Settings/CuraContainerStack.py +++ b/cura/Settings/CuraContainerStack.py @@ -91,12 +91,12 @@ class CuraContainerStack(ContainerStack): # # \param new_intent The new intent container. It is expected to have a "type" metadata entry with the value "intent". def setIntent(self, new_intent: InstanceContainer, postpone_emit: bool = False) -> None: - self.replaceContainer(_ContainerIndexes.Intent, new_intent, postpone_emit=postpone_emit) + self.replaceContainer(_ContainerIndexes.Intent, new_intent, postpone_emit = postpone_emit) ## Get the quality container. # # \return The intent container. Should always be a valid container, but can be equal to the empty InstanceContainer. - @pyqtProperty(InstanceContainer, fset=setIntent, notify=pyqtContainersChanged) + @pyqtProperty(InstanceContainer, fset = setIntent, notify = pyqtContainersChanged) def intent(self) -> InstanceContainer: return cast(InstanceContainer, self._containers[_ContainerIndexes.Intent]) diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index ce8ea8b85e..95faf27269 100755 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -1322,6 +1322,10 @@ class MachineManager(QObject): # It's also possible that the qualityChanges has an opinion about the intent_category. # This is in the case that a QC was made on an intent, but none of the materials have that intent. # If the user switches back, we do want the intent to be selected again. + # + # Do not ask empty quality changes for intent category. + if extruder.qualityChanges.getId() == empty_quality_changes_container.getId(): + continue current_category = extruder.qualityChanges.getMetaDataEntry("intent_category", "default") if current_category != "default" and current_category != category: category = current_category