From 5c9569cd35637f8ee4abdd07dae1ddb5496114bc Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Tue, 11 Feb 2025 00:59:30 +0100 Subject: [PATCH] Fix focus being lost after adding a new input map entry in the editor This allows adding multiple actions in a row by pressing Enter after each action, without needing to click the field again every time. --- editor/action_map_editor.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/editor/action_map_editor.cpp b/editor/action_map_editor.cpp index a881f2e3bae..b830c71c615 100644 --- a/editor/action_map_editor.cpp +++ b/editor/action_map_editor.cpp @@ -570,6 +570,7 @@ ActionMapEditor::ActionMapEditor() { add_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL); add_edit->set_placeholder(TTR("Add New Action")); add_edit->set_clear_button_enabled(true); + add_edit->set_keep_editing_on_text_submit(true); add_edit->connect(SceneStringName(text_changed), callable_mp(this, &ActionMapEditor::_add_edit_text_changed)); add_edit->connect(SceneStringName(text_submitted), callable_mp(this, &ActionMapEditor::_add_action)); add_hbox->add_child(add_edit);