summaryrefslogtreecommitdiffstats
path: root/scene/gui/file_dialog.cpp
diff options
context:
space:
mode:
authorJuan Linietsky <red@kyoko>2015-05-21 15:02:49 -0300
committerJuan Linietsky <red@kyoko>2015-05-21 15:02:49 -0300
commitbb5d46bb113bca3204db7678eb69900f159e8087 (patch)
treecd34e10d67a196d217559ab8d4973b8f5bc4ccde /scene/gui/file_dialog.cpp
parent4b8745ad63409cf14b02735981ee35d2f794421c (diff)
parent6049479a99f66b620d59498a76ed9f2c3891f4c8 (diff)
downloadredot-engine-bb5d46bb113bca3204db7678eb69900f159e8087.tar.gz
Merge branch 'master' of https://github.com/okamstudio/godot
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());
}
}