fixed bug with directory expansion
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -312,18 +312,21 @@ void wxDirCtrl::OnExpandItem(wxTreeEvent &event)
|
|||||||
wxBeginBusyCursor();
|
wxBeginBusyCursor();
|
||||||
|
|
||||||
wxDirItemData *data = (wxDirItemData *)GetItemData(event.GetItem());
|
wxDirItemData *data = (wxDirItemData *)GetItemData(event.GetItem());
|
||||||
wxASSERT(data);
|
|
||||||
|
|
||||||
m_paths.Clear();
|
m_paths.Clear();
|
||||||
m_names.Clear();
|
m_names.Clear();
|
||||||
|
|
||||||
wxDir dir(data->m_path);
|
wxString path = data->m_path;
|
||||||
|
|
||||||
|
wxDir dir(path);
|
||||||
|
|
||||||
|
path += _T('/');
|
||||||
|
|
||||||
wxString filename;
|
wxString filename;
|
||||||
bool cont = dir.GetFirst(&filename, "", wxDIR_DIRS | wxDIR_HIDDEN);
|
bool cont = dir.GetFirst(&filename, "", wxDIR_DIRS | wxDIR_HIDDEN);
|
||||||
while ( cont )
|
while ( cont )
|
||||||
{
|
{
|
||||||
m_paths.Add(data->m_path);
|
m_paths.Add(path + filename);
|
||||||
m_names.Add(filename);
|
m_names.Add(filename);
|
||||||
|
|
||||||
cont = dir.GetNext(&filename);
|
cont = dir.GetNext(&filename);
|
||||||
|
Reference in New Issue
Block a user