X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8253f2e0637d1c87e38e1b6163882bac35d15074..7b25d8e7bd0eca9f0f6efe62b3721d14c394dac9:/src/generic/dirctrlg.cpp?ds=sidebyside diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 6f050c806d..791b3a97a0 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -375,10 +375,6 @@ wxDirItemData::wxDirItemData(const wxString& path, const wxString& name, m_isDir = isDir; } -wxDirItemData::~wxDirItemData() -{ -} - void wxDirItemData::SetNewDirName(const wxString& path) { m_path = path; @@ -555,8 +551,19 @@ bool wxGenericDirCtrl::Create(wxWindow *parent, ExpandDir(m_rootId); // automatically expand first level // Expand and select the default path - if (!m_defaultPath.IsEmpty()) + if (!m_defaultPath.empty()) + { ExpandPath(m_defaultPath); + } +#ifdef __UNIX__ + else + { + // On Unix, there's only one node under the (hidden) root node. It + // represents the / path, so the user would always have to expand it; + // let's do it ourselves + ExpandPath(wxT("/")); + } +#endif SetBestSize(size); DoResize();