mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-08 22:35:03 -06:00
Add option for custom reset handler in setting item
This commit is contained in:
parent
4b1c0dff7a
commit
79028388a2
1 changed files with 7 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue