1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-16 14:00:40 +00:00

Remove auto selecting the first file for FileDialog with Save file mode selected

This commit is contained in:
Dawid Marzec
2022-11-13 02:24:17 +01:00
parent 140f039547
commit 5cd30be56d

View File

@@ -632,9 +632,12 @@ void FileDialog::update_file_list() {
files.pop_front();
}
if (mode != FILE_MODE_SAVE_FILE) {
// Select the first file from list if nothing is selected.
if (tree->get_root() && tree->get_root()->get_first_child() && tree->get_selected() == nullptr) {
tree->get_root()->get_first_child()->select(0);
}
}
}
void FileDialog::_filter_selected(int) {