From 4f8d7cae2601343d6221ec95485fc6812c9a22d8 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Wed, 30 Aug 2023 20:11:21 +0200 Subject: [PATCH] Add Ctrl + L / Cmd + Shift + G shortcut to focus path bar in FileDialog This also tweaks EditorFileDialog to use the same shortcut, while making it select the path text after focusing (like in most file managers). Ctrl + L / Cmd + Shift + G can also now be used to focus on the property name in the project settings editor, as well in the Input Map, Autoload, Shader Globals and Global Groups tabs. --- editor/action_map_editor.cpp | 4 ++++ editor/action_map_editor.h | 1 + editor/editor_autoload_settings.cpp | 4 ++++ editor/editor_autoload_settings.h | 2 ++ editor/filesystem_dock.cpp | 7 +++++++ editor/filesystem_dock.h | 1 + editor/group_settings_editor.cpp | 4 ++++ editor/group_settings_editor.h | 1 + editor/gui/editor_file_dialog.cpp | 6 +++++- editor/project_settings_editor.cpp | 28 +++++++++++++++++++++++++++- editor/project_settings_editor.h | 1 + editor/shader_globals_editor.cpp | 4 ++++ editor/shader_globals_editor.h | 2 ++ scene/gui/file_dialog.cpp | 21 +++++++++++++++++++++ 14 files changed, 84 insertions(+), 2 deletions(-) diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index 5154d2e0e0..7856d454d0 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -380,6 +380,10 @@ LineEdit *ActionMapEditor::get_search_box() const { return action_list_search; } +LineEdit *ActionMapEditor::get_path_box() const { + return add_edit; +} + InputEventConfigurationDialog *ActionMapEditor::get_configuration_dialog() { return event_config_dialog; } diff --git a/editor/action_map_editor.h b/editor/action_map_editor.h index 2848d23e83..2b329f2fca 100644 --- a/editor/action_map_editor.h +++ b/editor/action_map_editor.h @@ -118,6 +118,7 @@ protected: public: LineEdit *get_search_box() const; + LineEdit *get_path_box() const; InputEventConfigurationDialog *get_configuration_dialog(); // Dictionary represents an Action with "events" (Array) and "deadzone" (float) items. Pass with no param to update list from cached action map. diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp index 0e46990b41..4c0614afb2 100644 --- a/editor/editor_autoload_settings.cpp +++ b/editor/editor_autoload_settings.cpp @@ -587,6 +587,10 @@ void EditorAutoloadSettings::_script_created(Ref