improved docking
This commit is contained in:
@@ -356,6 +356,12 @@ void Node::add_child(std::shared_ptr<Node> n, int index)
|
||||
on_child_added(n.get());
|
||||
}
|
||||
|
||||
void Node::remove_from_parent()
|
||||
{
|
||||
if (m_parent)
|
||||
m_parent->remove_child(this);
|
||||
}
|
||||
|
||||
void Node::remove_child(Node* n)
|
||||
{
|
||||
auto i = std::find_if(m_children.begin(), m_children.end(), [=](auto& ptr) { return ptr.get() == n; });
|
||||
|
||||
Reference in New Issue
Block a user