From 56c5c8e8accc4a4a054fc036afddc6e925014782 Mon Sep 17 00:00:00 2001 From: Timur Doumler Date: Thu, 27 Oct 2016 15:38:16 +0100 Subject: [PATCH] Fixed an issue in CachedValue where setValue would not actually set the property if it's equal to the default. --- modules/juce_data_structures/values/juce_CachedValue.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/juce_data_structures/values/juce_CachedValue.h b/modules/juce_data_structures/values/juce_CachedValue.h index 3690b6955d..3e9e476a8e 100644 --- a/modules/juce_data_structures/values/juce_CachedValue.h +++ b/modules/juce_data_structures/values/juce_CachedValue.h @@ -242,7 +242,7 @@ inline CachedValue& CachedValue::operator= (const Type& newValue) template inline void CachedValue::setValue (const Type& newValue, UndoManager* undoManagerToUse) { - if (cachedValue != newValue) + if (cachedValue != newValue || isUsingDefault()) { cachedValue = newValue; targetTree.setProperty (targetProperty, VariantConverter::toVar (newValue), undoManagerToUse);