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:
commit
c3e5e4ed4b
4 changed files with 17 additions and 8 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue