mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-08-05 04:54:04 -06:00
Inherit button now has the same behaviour as 2.1 again
CURA-1278
This commit is contained in:
parent
b452af5dbf
commit
77431b01a3
1 changed files with 10 additions and 2 deletions
|
@ -24,7 +24,7 @@ Item {
|
|||
|
||||
// Create properties to put property provider stuff in (bindings break in qt 5.5.1 otherwise)
|
||||
property var state: propertyProvider.properties.state
|
||||
property var stackLevel: propertyProvider.stackLevel
|
||||
property var stackLevel: propertyProvider.stackLevels[0]
|
||||
|
||||
signal contextMenuRequested()
|
||||
signal showTooltip(string text);
|
||||
|
@ -166,7 +166,15 @@ Item {
|
|||
|
||||
onClicked: {
|
||||
focus = true;
|
||||
propertyProvider.removeFromContainer(base.stackLevel)
|
||||
// Get the deepest entry of this setting that we can find. TODO: This is a bit naive, in some cases
|
||||
// there might be multiple profiles saying something about the same setting. There is no strategy
|
||||
// how to handle this as of yet.
|
||||
var last_entry = propertyProvider.stackLevels.slice(-1)[0]
|
||||
// Put that entry into the "top" instance container.
|
||||
// This ensures that the value in any of the deeper containers need not be removed, which is
|
||||
// needed for the reset button (which deletes the top value) to correctly go back to profile
|
||||
// defaults.
|
||||
propertyProvider.setPropertyValue("value", propertyProvider.getPropertyValue("value", last_entry))
|
||||
}
|
||||
|
||||
backgroundColor: UM.Theme.getColor("setting_control");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue