Add option for custom reset handler in setting item

This commit is contained in:
ChrisTerBeke 2017-12-15 11:05:42 +01:00
parent 4b1c0dff7a
commit 79028388a2

View file

@ -179,8 +179,13 @@ Item {
iconSource: UM.Theme.getIcon("reset")
onClicked: {
revertButton.focus = true;
Cura.MachineManager.clearUserSettingAllCurrentStacks(propertyProvider.key);
revertButton.focus = true
if (resetHandler) {
resetHandler(propertyProvider.key)
} else {
Cura.MachineManager.clearUserSettingAllCurrentStacks(propertyProvider.key)
}
}
onEntered: { hoverTimer.stop(); base.showTooltip(catalog.i18nc("@label", "This setting has a value that is different from the profile.\n\nClick to restore the value of the profile.")) }