1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-11 13:10:58 +00:00

Hide Control focus when given via mouse input

This commit is contained in:
Michael Alexsander
2025-09-03 20:39:18 -03:00
parent 2753d333f6
commit aeb3a45c97
53 changed files with 229 additions and 105 deletions

View File

@@ -421,9 +421,9 @@ void FileDialog::_save_confirm_pressed() {
void FileDialog::_post_popup() {
ConfirmationDialog::_post_popup();
if (mode == FILE_MODE_SAVE_FILE) {
filename_edit->grab_focus();
filename_edit->grab_focus(true);
} else {
file_list->grab_focus();
file_list->grab_focus(true);
}
set_process_shortcut_input(true);
@@ -2035,7 +2035,7 @@ void FileDialog::set_show_filename_filter(bool p_show) {
filename_filter->grab_focus();
} else {
if (filename_filter->has_focus()) {
callable_mp((Control *)file_list, &Control::grab_focus).call_deferred();
callable_mp((Control *)file_list, &Control::grab_focus).call_deferred(false);
}
}
show_filename_filter = p_show;