summaryrefslogtreecommitdiff
path: root/scene/gui/file_dialog.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-05-19 21:36:35 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-05-19 21:36:35 -0300
commit221443c5a2d174e52d391d15d5f1c6b5c9496d57 (patch)
treedcea619ff3068a557c44aac5873676ea9e1a151c /scene/gui/file_dialog.cpp
parentf220183e40cb100cdfb8158c5217076377a62980 (diff)
more fixes
-only refuse to load an older file if version major is different, fixes #1944 -fix drive letter default value, fixes #1939
Diffstat (limited to 'scene/gui/file_dialog.cpp')
-rw-r--r--scene/gui/file_dialog.cpp10
1 files changed, 2 insertions, 8 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp
index 13cf87ac2b..c53de6568a 100644
--- a/scene/gui/file_dialog.cpp
+++ b/scene/gui/file_dialog.cpp
@@ -608,18 +608,12 @@ void FileDialog::_update_drives() {
drives->clear();
drives->show();
- int current=-1;
- String abspath = dir_access->get_current_dir();
-
for(int i=0;i<dir_access->get_drive_count();i++) {
- String d = dir_access->get_drive(i);
- if (abspath.begins_with(d))
- current=i;
+ String d = dir_access->get_drive(i);
drives->add_item(dir_access->get_drive(i));
}
- if (current!=-1)
- drives->select(current);
+ drives->select(dir_access->get_current_drive());
}
}