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:
parent
b36b64a482
commit
56c5c8e8ac
1 changed files with 1 additions and 1 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue