mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
adding bool to referTo if you want to notify listeners
This commit is contained in:
parent
26d0730b0b
commit
984fc9476f
2 changed files with 3 additions and 3 deletions
|
|
@ -174,7 +174,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)
|
||||
{
|
||||
|
|
@ -185,7 +185,7 @@ void Value::referTo (const Value& valueToReferTo)
|
|||
}
|
||||
|
||||
value = valueToReferTo.value;
|
||||
callListeners();
|
||||
if(notifyListeners) callListeners();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -112,7 +112,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.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue