Show "." in item_list of EditorFiledialog
This commit is contained in:
parent
241e2594f1
commit
ef1bfd3f2e
1 changed files with 14 additions and 13 deletions
|
@ -571,9 +571,10 @@ void EditorFileDialog::update_file_list() {
|
|||
files.sort_custom<NoCaseComparator>();
|
||||
|
||||
while(!dirs.empty()) {
|
||||
const String& dir_name=dirs.front()->get();
|
||||
|
||||
item_list->add_item(dir_name+"/");
|
||||
|
||||
if (dirs.front()->get()!=".") {
|
||||
item_list->add_item(dirs.front()->get()+"/");
|
||||
if (display_mode==DISPLAY_THUMBNAILS) {
|
||||
|
||||
item_list->set_item_icon(item_list->get_item_count()-1,folder_thumbnail);
|
||||
|
@ -583,13 +584,13 @@ void EditorFileDialog::update_file_list() {
|
|||
}
|
||||
|
||||
Dictionary d;
|
||||
d["name"]=dirs.front()->get();
|
||||
d["name"]=dir_name;
|
||||
d["path"]=String();
|
||||
d["dir"]=true;
|
||||
item_list->set_item_metadata( item_list->get_item_count() -1, d);
|
||||
}
|
||||
dirs.pop_front();
|
||||
|
||||
item_list->set_item_metadata( item_list->get_item_count() -1, d);
|
||||
|
||||
dirs.pop_front();
|
||||
}
|
||||
|
||||
dirs.clear();
|
||||
|
|
Loading…
Reference in a new issue