From f93f1952cba289c26e7c666c776a6d782c1e42f9 Mon Sep 17 00:00:00 2001 From: Chia-Hsiang Cheng <88014292+garychia@users.noreply.github.com> Date: Sun, 27 Aug 2023 17:25:17 +0800 Subject: [PATCH] Avoid selecting the first item automatically in Open Folder Mode --- scene/gui/file_dialog.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index d4da4797ebb..b903b31c78b 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -666,7 +666,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);