diff options
| author | oy <Tom_Adams@web.de> | 2010-09-24 13:48:23 +0200 |
|---|---|---|
| committer | oy <Tom_Adams@web.de> | 2010-09-24 13:48:23 +0200 |
| commit | feb7e60bb2a1ca85af8ecad15434f74caf2c8247 (patch) | |
| tree | 942cac209474853574e4c80ddd68c362717f098f /src/game/editor | |
| parent | 7e0b37e06c71dc96d68f3352ecd2c799caaaf8ec (diff) | |
| download | zcatch-feb7e60bb2a1ca85af8ecad15434f74caf2c8247.tar.gz zcatch-feb7e60bb2a1ca85af8ecad15434f74caf2c8247.zip | |
fixed map listing
Diffstat (limited to 'src/game/editor')
| -rw-r--r-- | src/game/editor/ed_editor.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/game/editor/ed_editor.cpp b/src/game/editor/ed_editor.cpp index 4b1a10cc..b1dce3f9 100644 --- a/src/game/editor/ed_editor.cpp +++ b/src/game/editor/ed_editor.cpp @@ -2148,10 +2148,11 @@ void CEditor::RenderImages(CUIRect ToolBox, CUIRect ToolBar, CUIRect View) static void EditorListdirCallback(const char *pName, int IsDir, int DirType, void *pUser) { - if(pName[0] == '.' && pName[1] == 0) + CEditor *pEditor = (CEditor*)pUser; + if(pName[0] == '.' && (pName[1] == 0 || + (pName[1] == '.' && pName[2] == 0 && (!str_comp(pEditor->m_aFileDialogPath, "maps") || !str_comp(pEditor->m_aFileDialogPath, "mapres"))))) return; - CEditor *pEditor = (CEditor*)pUser; pEditor->m_FileList.add(string(pName)); } @@ -2273,8 +2274,6 @@ void CEditor::RenderFileDialog() void CEditor::FilelistPopulate() { m_FileList.clear(); - if(str_comp(m_aFileDialogPath, "maps") != 0 && str_comp(m_aFileDialogPath, "mapres") != 0) - m_FileList.add(string("..")); Storage()->ListDirectory(m_FileDialogDirTypes, m_aFileDialogPath, EditorListdirCallback, this); } |