From 3881ed8a61f40249b96c5e6f2103b73f588e95fb Mon Sep 17 00:00:00 2001 From: Jaime van Kessel Date: Wed, 8 Jun 2016 14:58:05 +0200 Subject: [PATCH] Fixed behaviour of inheritance button CURA-1278 --- resources/qml/Settings/SettingItem.qml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/resources/qml/Settings/SettingItem.qml b/resources/qml/Settings/SettingItem.qml index 4fa615134b..2f1a74dba6 100644 --- a/resources/qml/Settings/SettingItem.qml +++ b/resources/qml/Settings/SettingItem.qml @@ -24,7 +24,8 @@ 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.stackLevels[0] + property var stackLevels: propertyProvider.stackLevels + property var stackLevel: stackLevels[0] signal contextMenuRequested() signal showTooltip(string text); @@ -159,7 +160,7 @@ Item { id: inheritButton; //visible: has_profile_value && base.has_inherit_function && base.is_enabled - visible: base.state == "InstanceState.User" && base.stackLevel > 0 && base.showInheritButton + visible: base.state == "InstanceState.User" && base.showInheritButton height: parent.height; width: height; @@ -175,6 +176,7 @@ Item { // 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)) + propertyProvider.setPropertyValue("state", "InstanceState.Calculated") } backgroundColor: UM.Theme.getColor("setting_control");