test floating some panels

This commit is contained in:
2019-03-24 01:43:13 +01:00
parent 929e80a218
commit a50654d8b7
7 changed files with 57 additions and 5 deletions

View File

@@ -302,6 +302,8 @@ const Node* Node::init_template(const char* id)
void Node::add_child(Node* n)
{
if (n->m_parent)
n->m_parent->remove_child(n);
m_children.emplace_back(n);
n->m_parent = this;
n->m_manager = m_manager;
@@ -312,6 +314,8 @@ void Node::add_child(Node* n)
void Node::add_child(Node* n, int index)
{
if (n->m_parent)
n->m_parent->remove_child(n);
m_children.emplace_back(n);
n->m_parent = this;
n->m_manager = m_manager;
@@ -322,6 +326,8 @@ void Node::add_child(Node* n, int index)
void Node::add_child(std::shared_ptr<Node> n)
{
if (n->m_parent)
n->m_parent->remove_child(n.get());
m_children.push_back(n);
n->m_parent = this;
n->m_manager = m_manager;
@@ -332,6 +338,8 @@ void Node::add_child(std::shared_ptr<Node> n)
void Node::add_child(std::shared_ptr<Node> n, int index)
{
if (n->m_parent)
n->m_parent->remove_child(n.get());
m_children.insert(m_children.begin() + index, n);
n->m_parent = this;
n->m_manager = m_manager;