diff --git a/cura/Settings/MachineManager.py b/cura/Settings/MachineManager.py index 11a8087f37..259f087149 100644 --- a/cura/Settings/MachineManager.py +++ b/cura/Settings/MachineManager.py @@ -412,6 +412,17 @@ class MachineManager(QObject): return False + @pyqtProperty(int, notify = activeStackValueChanged) + def numUserSettings(self): + if not self._global_container_stack: + return 0 + num_user_settings = 0 + num_user_settings += len(self._global_container_stack.getTop().findInstances()) + stacks = list(ExtruderManager.getInstance().getMachineExtruders(self._global_container_stack.getId())) + for stack in stacks: + num_user_settings += len(stack.getTop().findInstances()) + return num_user_settings + ## Delete a user setting from the global stack and all extruder stacks. # \param key \type{str} the name of the key to delete @pyqtSlot(str) diff --git a/resources/qml/WorkspaceSummaryDialog.qml b/resources/qml/WorkspaceSummaryDialog.qml index c8da87dc76..bcd0ac6819 100644 --- a/resources/qml/WorkspaceSummaryDialog.qml +++ b/resources/qml/WorkspaceSummaryDialog.qml @@ -119,7 +119,21 @@ UM.Dialog text: catalog.i18nc("@action:label", "Profile settings") font.bold: true } - + Row + { + width: parent.width + Label + { + text: catalog.i18nc("@action:label", "Not in profile") + width: parent.width / 3 + } + Label + { + text: catalog.i18nc("@action:label", "%1 override(s)").arg(Cura.MachineManager.numUserSettings) + width: parent.width / 3 + } + visible: Cura.MachineManager.numUserSettings + } Row { width: parent.width