1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-11 23:54:18 +00:00
This commit is contained in:
Gavin Burke 2025-07-11 04:30:17 +02:00 committed by GitHub
commit 8a99bc1a71
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 54 additions and 9 deletions

View file

@ -183,7 +183,7 @@ Value& Value::operator= (const var& newValue)
return *this;
}
void Value::referTo (const Value& valueToReferTo)
void Value::referTo (const Value& valueToReferTo, bool notifyListeners)
{
if (valueToReferTo.value != value)
{
@ -194,7 +194,7 @@ void Value::referTo (const Value& valueToReferTo)
}
value = valueToReferTo.value;
callListeners();
if(notifyListeners) callListeners();
}
}

View file

@ -121,7 +121,7 @@ public:
Existing listeners will still be registered after you call this method, and
they'll continue to receive messages when the new value changes.
*/
void referTo (const Value& valueToReferTo);
void referTo (const Value& valueToReferTo, bool notifyListeners = true);
/** Returns true if this object and the other one use the same underlying
ValueSource object.