Added handling of special case when only user & definition were set

CURA-1278
This commit is contained in:
Jaime van Kessel 2016-06-08 15:31:28 +02:00
parent 3881ed8a61
commit cf15f9e2a1

View File

@ -175,9 +175,18 @@ Item {
// 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.
if(last_entry == 4 && base.stackLevel == 0)
{
// Special case of the inherit reset. If only the definition (4th container) and the first
// entry (user container) are set, we can simply remove the container.
propertyProvider.removeFromContainer(0)
}
else
{
propertyProvider.setPropertyValue("value", propertyProvider.getPropertyValue("value", last_entry))
propertyProvider.setPropertyValue("state", "InstanceState.Calculated")
}
}
backgroundColor: UM.Theme.getColor("setting_control");
hoverBackgroundColor: UM.Theme.getColor("setting_control_highlight")