Browse Source

Merge pull request #102683 from Calinou/editor-input-map-keep-focus-on-new-entry

Fix focus being lost after adding a new input map entry in the editor
Rémi Verschelde 8 months ago
parent
commit
dd8a55d899
1 changed files with 1 additions and 0 deletions
  1. 1 0
      editor/action_map_editor.cpp

+ 1 - 0
editor/action_map_editor.cpp

@@ -570,6 +570,7 @@ ActionMapEditor::ActionMapEditor() {
 	add_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
 	add_edit->set_h_size_flags(Control::SIZE_EXPAND_FILL);
 	add_edit->set_placeholder(TTR("Add New Action"));
 	add_edit->set_placeholder(TTR("Add New Action"));
 	add_edit->set_clear_button_enabled(true);
 	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_changed), callable_mp(this, &ActionMapEditor::_add_edit_text_changed));
 	add_edit->connect(SceneStringName(text_submitted), callable_mp(this, &ActionMapEditor::_add_action));
 	add_edit->connect(SceneStringName(text_submitted), callable_mp(this, &ActionMapEditor::_add_action));
 	add_hbox->add_child(add_edit);
 	add_hbox->add_child(add_edit);