mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-20 21:39:16 +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")
|
iconSource: UM.Theme.getIcon("reset")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
revertButton.focus = true;
|
revertButton.focus = true
|
||||||
Cura.MachineManager.clearUserSettingAllCurrentStacks(propertyProvider.key);
|
|
||||||
|
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.")) }
|
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