X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/1b941f2d3143c1205fc7c5b01bd254781db728b3..fd359806233566c07d5191d5d1038f30799cffb3:/src/generic/dirctrlg.cpp diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 7a5d5a8d36..791b3a97a0 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -551,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();