summaryrefslogtreecommitdiff
path: root/scene/gui/file_dialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'scene/gui/file_dialog.cpp')
-rw-r--r--scene/gui/file_dialog.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 87a232e766..d8ff048dfb 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -115,6 +115,9 @@ Vector<String> FileDialog::get_selected_files() const {
void FileDialog::update_dir() {
dir->set_text(dir_access->get_current_dir());
+ if (drives->is_visible()) {
+ drives->select(dir_access->get_current_drive());
+ }
}
void FileDialog::_dir_entered(String p_dir) {
@@ -666,7 +669,6 @@ void FileDialog::_update_drives() {
drives->show();
for (int i = 0; i < dir_access->get_drive_count(); i++) {
- String d = dir_access->get_drive(i);
drives->add_item(dir_access->get_drive(i));
}