mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-12 01:29:00 +08:00
Added handling of special case when only user & definition were set
CURA-1278
This commit is contained in:
parent
3881ed8a61
commit
cf15f9e2a1
@ -175,8 +175,17 @@ Item {
|
|||||||
// This ensures that the value in any of the deeper containers need not be removed, which is
|
// 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
|
// needed for the reset button (which deletes the top value) to correctly go back to profile
|
||||||
// defaults.
|
// defaults.
|
||||||
propertyProvider.setPropertyValue("value", propertyProvider.getPropertyValue("value", last_entry))
|
if(last_entry == 4 && base.stackLevel == 0)
|
||||||
propertyProvider.setPropertyValue("state", "InstanceState.Calculated")
|
{
|
||||||
|
// 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");
|
backgroundColor: UM.Theme.getColor("setting_control");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user