summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2020-06-03 11:31:54 +0200
committerGitHub <noreply@github.com>2020-06-03 11:31:54 +0200
commit3a59c24b51e0b1fe1b3f10e06c7b90acce6c0cf4 (patch)
tree32ad62b2e2ec29d0bf64172aa7c7bdddcff24ded
parent9043605ab8160ff32528c44d10b058ab8200be2a (diff)
parent1ec8f59397c157e9f826e1cd53e7790315c969d7 (diff)
Merge pull request #39150 from dreamsComeTrue/project-manager-grab-focus-on-enter
Grabbing focus on ProjectList after clicking an item.
-rw-r--r--editor/project_manager.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index dc5ff6a5eb..499f7d4017 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -916,6 +916,8 @@ public:
icon = nullptr;
icon_needs_reload = true;
hover = false;
+
+ set_focus_mode(FocusMode::FOCUS_ALL);
}
void set_is_favorite(bool fav) {
@@ -1739,6 +1741,10 @@ void ProjectList::_panel_input(const Ref<InputEvent> &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()) {