Prevent escape key from closing Editor Settings window when filtering for shorcuts

(cherry picked from commit eb565780e7)
This commit is contained in:
Robert Yevdokimov 2023-12-30 15:33:37 -05:00 committed by Rémi Verschelde
parent 4e615b162d
commit 7e7bf59f68
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 2 additions and 0 deletions

View File

@ -772,6 +772,8 @@ EditorSettingsDialog::EditorSettingsDialog() {
shortcut_search_by_event->set_stretch_ratio(0.75); shortcut_search_by_event->set_stretch_ratio(0.75);
shortcut_search_by_event->set_allowed_input_types(INPUT_KEY); shortcut_search_by_event->set_allowed_input_types(INPUT_KEY);
shortcut_search_by_event->connect("event_changed", callable_mp(this, &EditorSettingsDialog::_filter_shortcuts_by_event)); shortcut_search_by_event->connect("event_changed", callable_mp(this, &EditorSettingsDialog::_filter_shortcuts_by_event));
shortcut_search_by_event->connect("focus_entered", callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(false));
shortcut_search_by_event->connect("focus_exited", callable_mp((AcceptDialog *)this, &AcceptDialog::set_close_on_escape).bind(true));
top_hbox->add_child(shortcut_search_by_event); top_hbox->add_child(shortcut_search_by_event);
Button *clear_all_search = memnew(Button); Button *clear_all_search = memnew(Button);