Skip to content

Commit

Permalink
Ignore internal children when replacing node
Browse files Browse the repository at this point in the history
  • Loading branch information
KoBeWi committed Jan 3, 2024
1 parent d822fd5 commit cd2edfe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scene/main/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2832,7 +2832,7 @@ void Node::replace_by(Node *p_node, bool p_keep_groups) {
}

Node *parent = data.parent;
int index_in_parent = get_index();
int index_in_parent = get_index(false);

if (data.parent) {
parent->remove_child(this);
Expand Down

0 comments on commit cd2edfe

Please sign in to comment.