diff options
author | George Marques <george@gmarqu.es> | 2017-11-21 12:30:20 -0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-21 12:30:20 -0200 |
commit | 20b07a1fb55c31d326c3f9c36d1276eb1bcf15e6 (patch) | |
tree | 0a352f77c40f9ca7a5c0530649b4a108bfef2406 /scene/gui/file_dialog.cpp | |
parent | 25b860ee2ac60fcc1bc58e9d82672c2549ce07ca (diff) | |
parent | 20bda9a2badc4545cf061a1b4da32328b4caff15 (diff) |
Merge pull request #13121 from Krakean/change_filedialog_removedot
Remove the "." and "/" (at the end of folders name) from file manage dialog (open scene, open file, ...)
Diffstat (limited to 'scene/gui/file_dialog.cpp')
-rw-r--r-- | scene/gui/file_dialog.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scene/gui/file_dialog.cpp b/scene/gui/file_dialog.cpp index 6ade4fcc38..6aba535572 100644 --- a/scene/gui/file_dialog.cpp +++ b/scene/gui/file_dialog.cpp @@ -323,6 +323,9 @@ void FileDialog::update_file_list() { while ((item = dir_access->get_next(&isdir)) != "") { + if (item == ".") + continue; + ishidden = dir_access->current_is_hidden(); if (show_hidden || !ishidden) { @@ -344,7 +347,7 @@ void FileDialog::update_file_list() { while (!dirs.empty()) { String &dir_name = dirs.front()->get(); TreeItem *ti = tree->create_item(root); - ti->set_text(0, dir_name + "/"); + ti->set_text(0, dir_name); ti->set_icon(0, folder); Dictionary d; |