Skip to content

Commit

Permalink
Merge pull request #81189 from jsjtxietian/Fix-press-space-when-enter…
Browse files Browse the repository at this point in the history
…-editor-layout-name-will-confirm-save

Use `ui_text_submit` instead of `ui_accept` to confirm and close text prompts
  • Loading branch information
akien-mga committed Sep 2, 2023
2 parents d189634 + ba41910 commit 0703546
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion editor/editor_layouts_dialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
}
Expand Down
2 changes: 1 addition & 1 deletion editor/plugins/theme_editor_plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 0703546

Please sign in to comment.