summaryrefslogtreecommitdiff
path: root/scene/gui/file_dialog.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2015-06-06 11:09:00 -0300
committerJuan Linietsky <reduzio@gmail.com>2015-06-06 11:09:00 -0300
commit954256268afe89b648d356ee0b296a9e97a07373 (patch)
tree36c42fb01f05d26bbae438d470676c9487b47a04 /scene/gui/file_dialog.cpp
parent0e1510214a7585d5446f06344468ab52298cfa81 (diff)
parentab99671bb835a5fe24a092ec34afe1ad862ac254 (diff)
Merge branch 'master' of https://github.com/okamstudio/godot
Conflicts: demos/2d/motion/engine.cfg
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());
}
}