Merge pull request #27899 from KoBeWi/tree_focus

Focus SceneTree dock after creating new node
This commit is contained in:
Rémi Verschelde 2019-04-11 15:53:10 +02:00 committed by GitHub
commit edc9097bc1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 0 deletions

View File

@ -1848,6 +1848,8 @@ void SceneTreeDock::_create() {
replace_node(n, newnode); replace_node(n, newnode);
} }
} }
scene_tree->get_scene_tree()->call_deferred("grab_focus");
} }
void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_properties) { void SceneTreeDock::replace_node(Node *p_node, Node *p_by_node, bool p_keep_properties) {