mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 13:39:08 +08:00
Add option for custom reset handler in setting item
This commit is contained in:
parent
4b1c0dff7a
commit
79028388a2
@ -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.")) }
|
||||
|
Loading…
x
Reference in New Issue
Block a user