Merge pull request #81189 from jsjtxietian/Fix-press-space-when-enter-editor-layout-name-will-confirm-save

Use `ui_text_submit` instead of `ui_accept` to confirm and close text prompts
This commit is contained in:
Rémi Verschelde 2023-09-02 14:30:12 +02:00
commit 07035466e8
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 2 additions and 2 deletions

View File

@ -42,7 +42,7 @@ void EditorLayoutsDialog::_line_gui_input(const Ref<InputEvent> &p_event) {
Ref<InputEventKey> k = p_event;
if (k.is_valid()) {
if (k->is_action_pressed(SNAME("ui_accept"), false, true)) {
if (k->is_action_pressed(SNAME("ui_text_submit"), false, true)) {
if (get_hide_on_ok()) {
hide();
}

View File

@ -1834,7 +1834,7 @@ void ThemeItemEditorDialog::_edit_theme_item_gui_input(const Ref<InputEvent> &p_
return;
}
if (k->is_action_pressed(SNAME("ui_accept"), false, true)) {
if (k->is_action_pressed(SNAME("ui_text_submit"), false, true)) {
_confirm_edit_theme_item();
edit_theme_item_dialog->hide();
edit_theme_item_dialog->set_input_as_handled();