1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Fixed an issue in CachedValue where setValue would not actually set the property if it's equal to the default.

This commit is contained in:
Timur Doumler 2016-10-27 15:38:16 +01:00
parent b36b64a482
commit 56c5c8e8ac

View file

@ -242,7 +242,7 @@ inline CachedValue<Type>& CachedValue<Type>::operator= (const Type& newValue)
template <typename Type>
inline void CachedValue<Type>::setValue (const Type& newValue, UndoManager* undoManagerToUse)
{
if (cachedValue != newValue)
if (cachedValue != newValue || isUsingDefault())
{
cachedValue = newValue;
targetTree.setProperty (targetProperty, VariantConverter<Type>::toVar (newValue), undoManagerToUse);