1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Added a new callback ValueTree::Listener::valueTreeRedirected()

This commit is contained in:
jules 2012-07-03 20:47:06 +01:00
parent 46c327d902
commit 7f74968cef
2 changed files with 8 additions and 7 deletions

View file

@ -663,6 +663,8 @@ ValueTree& ValueTree::operator= (const ValueTree& other)
}
object = other.object;
listeners.call (&ValueTree::Listener::valueTreeRedirected, *this);
return *this;
}
@ -671,12 +673,6 @@ ValueTree::ValueTree (ValueTree&& other) noexcept
: object (static_cast <SharedObject::Ptr&&> (other.object))
{
}
ValueTree& ValueTree::operator= (ValueTree&& other) noexcept
{
object = static_cast <SharedObject::Ptr&&> (other.object);
return *this;
}
#endif
ValueTree::~ValueTree()

View file

@ -93,7 +93,6 @@ public:
#if JUCE_COMPILER_SUPPORTS_MOVE_SEMANTICS
ValueTree (ValueTree&& other) noexcept;
ValueTree& operator= (ValueTree&& other) noexcept;
#endif
/** Destructor. */
@ -412,6 +411,12 @@ public:
the listener is registered, and not to any of its children.
*/
virtual void valueTreeParentChanged (ValueTree& treeWhoseParentHasChanged) = 0;
/** This method is called when a tree is made to point to a different internal shared object.
When operator= is used to make a ValueTree refer to a different object, this callback
will be made.
*/
virtual void valueTreeRedirected (ValueTree& treeWhichHasBeenChanged) {}
};
/** Adds a listener to receive callbacks when this node is changed.