mirror of
https://github.com/godotengine/godot.git
synced 2024-10-23 05:31:54 +00:00
Merge pull request #81034 from garychia/open_folder
FileDialog: Avoid selecting the first item automatically in Open Folder Mode
This commit is contained in:
commit
49cdd330be
|
@ -676,7 +676,7 @@ void FileDialog::update_file_list() {
|
|||
files.pop_front();
|
||||
}
|
||||
|
||||
if (mode != FILE_MODE_SAVE_FILE) {
|
||||
if (mode != FILE_MODE_SAVE_FILE && mode != FILE_MODE_OPEN_DIR) {
|
||||
// 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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user