Merge pull request #68599 from Rindbee/update-edited_scene_root-in-time

Update the edit scene root in time after it is replaced
This commit is contained in:
Rémi Verschelde
2023-06-12 17:08:50 +02:00
4 changed files with 17 additions and 8 deletions

View File

@@ -2470,11 +2470,6 @@ void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_prop
}
n->replace_by(newnode, true);
if (n == edited_scene) {
edited_scene = newnode;
EditorNode::get_singleton()->set_edited_scene(newnode);
}
//small hack to make collisionshapes and other kind of nodes to work
for (int i = 0; i < newnode->get_child_count(); i++) {
Node *c = newnode->get_child(i);