mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 20:29:05 +08:00
Make reset and restore default buttons work properly again
Contributes to CURA-1278
This commit is contained in:
parent
d5fa6d884f
commit
8804c2837f
@ -89,7 +89,7 @@ Item {
|
|||||||
{
|
{
|
||||||
id: revertButton;
|
id: revertButton;
|
||||||
|
|
||||||
visible: propertyProvider.properties.state == "InstanceState.User"
|
visible: propertyProvider.stackLevel == 0
|
||||||
|
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
width: height;
|
width: height;
|
||||||
@ -102,8 +102,8 @@ Item {
|
|||||||
iconSource: UM.Theme.getIcon("reset")
|
iconSource: UM.Theme.getIcon("reset")
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
base.resetRequested()
|
revertButton.focus = true
|
||||||
controlContainer.notifyReset();
|
propertyProvider.removeFromContainer(0)
|
||||||
}
|
}
|
||||||
|
|
||||||
onEntered: 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: 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."))
|
||||||
@ -116,14 +116,14 @@ Item {
|
|||||||
id: inheritButton;
|
id: inheritButton;
|
||||||
|
|
||||||
//visible: has_profile_value && base.has_inherit_function && base.is_enabled
|
//visible: has_profile_value && base.has_inherit_function && base.is_enabled
|
||||||
visible: propertyProvider.properties.state == "InstanceState.User"
|
visible: propertyProvider.properties.state == "InstanceState.User" && propertyProvider.stackLevel > 0
|
||||||
|
|
||||||
height: parent.height;
|
height: parent.height;
|
||||||
width: height;
|
width: height;
|
||||||
|
|
||||||
onClicked: {
|
onClicked: {
|
||||||
base.resetToDefaultRequested();
|
focus = true;
|
||||||
controlContainer.notifyReset();
|
propertyProvider.removeFromContainer(propertyProvider.stackLevel)
|
||||||
}
|
}
|
||||||
|
|
||||||
backgroundColor: UM.Theme.getColor("setting_control");
|
backgroundColor: UM.Theme.getColor("setting_control");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user