Focus the scene tree dock after hitting one of the "Create Root Node:" buttons

(cherry picked from commit 285024e806)
This commit is contained in:
Lightning_A 2021-06-11 12:37:32 -06:00 committed by Rémi Verschelde
parent cdaae2abfb
commit 63581fccc3
No known key found for this signature in database
GPG Key ID: C3336907360768E1

View File

@ -1154,6 +1154,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: {
@ -2276,7 +2277,7 @@ void SceneTreeDock::_create() {
_do_reparent(last_created, -1, nodes, true);
}
scene_tree->get_scene_tree()->call_deferred("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) {