Fix "reparent to new node" when node has internal children

(cherry picked from commit 8da49ab947)
This commit is contained in:
RedMser 2024-09-06 13:13:40 +02:00 committed by Rémi Verschelde
parent 7f0cc1aa35
commit 02c45088ea
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 1 additions and 1 deletions

View File

@ -2920,7 +2920,7 @@ void SceneTreeDock::_create() {
int original_position = -1; int original_position = -1;
if (only_one_top_node) { if (only_one_top_node) {
parent = top_node->get_parent(); parent = top_node->get_parent();
original_position = top_node->get_index(); original_position = top_node->get_index(false);
} else { } else {
parent = top_node->get_parent()->get_parent(); parent = top_node->get_parent()->get_parent();
} }