diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2021-08-12 08:13:01 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-08-12 08:13:01 +0200 |
commit | d64343911c06e740a9138cf3c757687b2fe8396c (patch) | |
tree | 92e4411be0dc18a5a70f488aa986fe1fb39ae1e9 /editor | |
parent | c3041ffe98947b37012ba0fc2dd36ae1f4d56e84 (diff) | |
parent | 285024e80696899c66599ff4e533ea113d70c9a5 (diff) |
Merge pull request #49521 from LightningAA/focus-scenetree-on-root-node-4.0
Focus the scene tree dock after hitting one of the "Create Root Node:" buttons
Diffstat (limited to 'editor')
-rw-r--r-- | editor/scene_tree_dock.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp index 8994adf112..0b228c2695 100644 --- a/editor/scene_tree_dock.cpp +++ b/editor/scene_tree_dock.cpp @@ -1143,6 +1143,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { editor_selection->clear(); editor_selection->add_node(new_node); + scene_tree->get_scene_tree()->grab_focus(); } break; default: { @@ -2279,7 +2280,7 @@ void SceneTreeDock::_create() { _do_reparent(last_created, -1, nodes, true); } - scene_tree->get_scene_tree()->call_deferred(SNAME("grab_focus")); + scene_tree->get_scene_tree()->grab_focus(); } void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_properties, bool p_remove_old) { |