Skip to content

Commit

Permalink
Fix selecting root when opening scene.
Browse files Browse the repository at this point in the history
  • Loading branch information
ajreckof committed May 12, 2024
1 parent f91db3d commit 0ab5d37
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 6 deletions.
6 changes: 1 addition & 5 deletions editor/editor_node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4055,11 +4055,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b

EditorDebuggerNode::get_singleton()->update_live_edit_root();

// Tell everything to edit this object, unless we're in the process of restoring scenes.
// If we are, we'll edit it after the restoration is done.
if (!restoring_scenes) {
push_item(new_scene);
} else {
if (restoring_scenes) {
// Initialize history for restored scenes.
ObjectID id = new_scene->get_instance_id();
if (id != editor_history.get_current()) {
Expand Down
1 change: 0 additions & 1 deletion editor/scene_tree_dock.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4354,7 +4354,6 @@ SceneTreeDock::SceneTreeDock(Node *p_scene_root, EditorSelection *p_editor_selec
scene_tree->set_v_size_flags(SIZE_EXPAND | SIZE_FILL);
scene_tree->connect("rmb_pressed", callable_mp(this, &SceneTreeDock::_tree_rmb));

scene_tree->connect("node_selected", callable_mp(this, &SceneTreeDock::_node_selected), CONNECT_DEFERRED);
scene_tree->connect("node_renamed", callable_mp(this, &SceneTreeDock::_node_renamed), CONNECT_DEFERRED);
scene_tree->connect("node_prerename", callable_mp(this, &SceneTreeDock::_node_prerenamed));
scene_tree->connect("open", callable_mp(this, &SceneTreeDock::_load_request));
Expand Down

0 comments on commit 0ab5d37

Please sign in to comment.