diff --git a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml index 65b67791c7..ea126bfd44 100644 --- a/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml +++ b/plugins/PerObjectSettingsTool/PerObjectSettingsPanel.qml @@ -145,6 +145,7 @@ Item { property var settingDefinitionsModel: addedSettingsModel property var propertyProvider: provider property var globalPropertyProvider: inheritStackProvider + property var externalResetHandler: false //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes, diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index dd15877f48..1fa83cb6d4 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -19,8 +19,6 @@ Item { property alias contents: controlContainer.children property alias hovered: mouse.containsMouse - property var resetHandler: false - property var showRevertButton: true property var showInheritButton: true property var showLinkedSettingIcon: true @@ -183,8 +181,8 @@ Item { onClicked: { revertButton.focus = true - if (resetHandler) { - resetHandler(propertyProvider.key) + if (externalResetHandler) { + externalResetHandler(propertyProvider.key) } else { Cura.MachineManager.clearUserSettingAllCurrentStacks(propertyProvider.key) } diff --git a/resources/qml/Settings/SettingView.qml b/resources/qml/Settings/SettingView.qml index 1ebb5cc40e..5d39572647 100644 --- a/resources/qml/Settings/SettingView.qml +++ b/resources/qml/Settings/SettingView.qml @@ -287,6 +287,7 @@ Item property var settingDefinitionsModel: definitionsModel property var propertyProvider: provider property var globalPropertyProvider: inheritStackProvider + property var externalResetHandler: false //Qt5.4.2 and earlier has a bug where this causes a crash: https://bugreports.qt.io/browse/QTBUG-35989 //In addition, while it works for 5.5 and higher, the ordering of the actual combo box drop down changes,