Browse Source

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

tags/2021-05-28
Timur Doumler 8 years ago
parent
commit
56c5c8e8ac
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      modules/juce_data_structures/values/juce_CachedValue.h

+ 1
- 1
modules/juce_data_structures/values/juce_CachedValue.h 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);


Loading…
Cancel
Save