mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-09 23:34:20 +00:00
Merge f868969e79 into bc7339fe07
This commit is contained in:
commit
3d7dae703f
2 changed files with 10 additions and 4 deletions
|
|
@ -251,7 +251,7 @@ public:
|
|||
return children.indexOf (child.object);
|
||||
}
|
||||
|
||||
void addChild (SharedObject* child, int index, UndoManager* undoManager)
|
||||
ValueTree& addChild (SharedObject* child, int index, UndoManager* undoManager)
|
||||
{
|
||||
if (child != nullptr && child->parent != this)
|
||||
{
|
||||
|
|
@ -290,9 +290,11 @@ public:
|
|||
jassertfalse;
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void removeChild (int childIndex, UndoManager* undoManager)
|
||||
ValueTree& removeChild (int childIndex, UndoManager* undoManager)
|
||||
{
|
||||
if (auto child = Ptr (children.getObjectPointer (childIndex)))
|
||||
{
|
||||
|
|
@ -308,6 +310,8 @@ public:
|
|||
undoManager->perform (new AddOrRemoveChildAction (*this, childIndex, {}));
|
||||
}
|
||||
}
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
void removeAllChildren (UndoManager* undoManager)
|
||||
|
|
|
|||
|
|
@ -332,14 +332,16 @@ public:
|
|||
If the undoManager parameter is not nullptr, its UndoManager::perform() method will be used,
|
||||
so that this change can be undone. Be very careful not to mix undoable and non-undoable changes!
|
||||
@see appendChild, removeChild
|
||||
@returns a reference to the value tree, so that you can daisy-chain calls to this method.
|
||||
*/
|
||||
void addChild (const ValueTree& child, int index, UndoManager* undoManager);
|
||||
ValueTree& addChild (const ValueTree& child, int index, UndoManager* undoManager);
|
||||
|
||||
/** Appends a new child sub-tree to this tree.
|
||||
This is equivalent to calling addChild() with an index of -1. See addChild() for more details.
|
||||
@see addChild, removeChild
|
||||
@returns a reference to the value tree, so that you can daisy-chain calls to this method.
|
||||
*/
|
||||
void appendChild (const ValueTree& child, UndoManager* undoManager);
|
||||
ValueTree& appendChild (const ValueTree& child, UndoManager* undoManager);
|
||||
|
||||
/** Removes the specified child from this tree's child-list.
|
||||
If the undoManager parameter is not nullptr, its UndoManager::perform() method will be used,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue