summaryrefslogtreecommitdiffstats
path: root/editor/editor_help_search.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-09-16 13:34:38 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-09-16 13:34:38 +0200
commit4d35402c1c9bf694041c0d8ecc7cf035d5bf8afd (patch)
treec996ec2de68da41a77f37bac66b0907541662deb /editor/editor_help_search.cpp
parent8ebfd89359d92ae3e785dcc802c831d66b3259e5 (diff)
parent74f64aaf98beba74c8c7eedac152c4a50b336994 (diff)
downloadredot-engine-4d35402c1c9bf694041c0d8ecc7cf035d5bf8afd.tar.gz
Merge pull request #96400 from Maran23/inputmap-usage-for-filter-and-corresponding-refactor
Use InputMap actions consistently across all LineEdit's that filter an underlying Tree or ItemList.
Diffstat (limited to 'editor/editor_help_search.cpp')
-rw-r--r--editor/editor_help_search.cpp15
1 files changed, 4 insertions, 11 deletions
diff --git a/editor/editor_help_search.cpp b/editor/editor_help_search.cpp
index 11be765bc2..47ff21bc82 100644
--- a/editor/editor_help_search.cpp
+++ b/editor/editor_help_search.cpp
@@ -170,19 +170,12 @@ void EditorHelpSearch::_update_results() {
}
void EditorHelpSearch::_search_box_gui_input(const Ref<InputEvent> &p_event) {
- // Redirect up and down navigational key events to the results list.
+ // Redirect navigational key events to the tree.
Ref<InputEventKey> key = p_event;
if (key.is_valid()) {
- switch (key->get_keycode()) {
- case Key::UP:
- case Key::DOWN:
- case Key::PAGEUP:
- case Key::PAGEDOWN: {
- results_tree->gui_input(key);
- search_box->accept_event();
- } break;
- default:
- break;
+ if (key->is_action("ui_up", true) || key->is_action("ui_down", true) || key->is_action("ui_page_up") || key->is_action("ui_page_down")) {
+ results_tree->gui_input(key);
+ search_box->accept_event();
}
}
}