parent
94653f0e88
commit
cf7ba8e390
|
@ -1317,12 +1317,13 @@ void Node::remove_and_skip() {
|
||||||
|
|
||||||
bool clear = true;
|
bool clear = true;
|
||||||
for (int i = 0; i < data.children.size(); i++) {
|
for (int i = 0; i < data.children.size(); i++) {
|
||||||
if (!data.children[i]->get_owner())
|
Node *c_node = data.children[i];
|
||||||
|
if (!c_node->get_owner())
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
remove_child(data.children[i]);
|
remove_child(c_node);
|
||||||
data.children[i]->_propagate_replace_owner(this, NULL);
|
c_node->_propagate_replace_owner(this, NULL);
|
||||||
children.push_back(data.children[i]);
|
children.push_back(c_node);
|
||||||
clear = false;
|
clear = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1333,9 +1334,9 @@ void Node::remove_and_skip() {
|
||||||
|
|
||||||
while (!children.empty()) {
|
while (!children.empty()) {
|
||||||
|
|
||||||
Node *c = children.front()->get();
|
Node *c_node = children.front()->get();
|
||||||
data.parent->add_child(c);
|
data.parent->add_child(c_node);
|
||||||
c->_propagate_replace_owner(NULL, new_owner);
|
c_node->_propagate_replace_owner(NULL, new_owner);
|
||||||
children.pop_front();
|
children.pop_front();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue