Ignore internal children when replacing node

This commit is contained in:
kobewi 2024-01-03 13:04:16 +01:00
parent d822fd5322
commit cd2edfef25

View file

@ -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);