From 982ab51f2fe05217074cf1f1a03a4f6974e8d0f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20=27dreamsComeTrue=27=20Jasi=C5=84ski?= Date: Fri, 29 May 2020 20:21:15 +0200 Subject: [PATCH] Grabbing focus on ProjectList after clicking an item. Fixes: #39012 (cherry picked from commit 1ec8f59397c157e9f826e1cd53e7790315c969d7) --- editor/project_manager.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp index 98f1fac484a..2a77d1be897 100644 --- a/editor/project_manager.cpp +++ b/editor/project_manager.cpp @@ -945,6 +945,8 @@ public: icon = NULL; icon_needs_reload = true; hover = false; + + set_focus_mode(FocusMode::FOCUS_ALL); } void set_is_favorite(bool fav) { @@ -1728,6 +1730,10 @@ void ProjectList::_panel_input(const Ref &p_ev, Node *p_hb) { select_project(clicked_index); } + if (_selected_project_keys.has(clicked_project.project_key)) { + clicked_project.control->grab_focus(); + } + emit_signal(SIGNAL_SELECTION_CHANGED); if (!mb->get_control() && mb->is_doubleclick()) {