Fix inefficient list iteration in Node
(cherry picked from commit 75ba837612
)
This commit is contained in:
parent
b254088b7a
commit
3d4c2fa7da
|
@ -2834,12 +2834,12 @@ void Node::replace_by(Node *p_node, bool p_keep_groups) {
|
|||
}
|
||||
|
||||
p_node->set_owner(owner);
|
||||
for (int i = 0; i < owned.size(); i++) {
|
||||
owned[i]->set_owner(p_node);
|
||||
for (Node *E : owned) {
|
||||
E->set_owner(p_node);
|
||||
}
|
||||
|
||||
for (int i = 0; i < owned_by_owner.size(); i++) {
|
||||
owned_by_owner[i]->set_owner(owner);
|
||||
for (Node *E : owned_by_owner) {
|
||||
E->set_owner(owner);
|
||||
}
|
||||
|
||||
p_node->set_scene_file_path(get_scene_file_path());
|
||||
|
|
Loading…
Reference in New Issue