be user friendly on Unix and expand the / node automatically
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -551,8 +551,19 @@ bool wxGenericDirCtrl::Create(wxWindow *parent,
|
|||||||
ExpandDir(m_rootId); // automatically expand first level
|
ExpandDir(m_rootId); // automatically expand first level
|
||||||
|
|
||||||
// Expand and select the default path
|
// Expand and select the default path
|
||||||
if (!m_defaultPath.IsEmpty())
|
if (!m_defaultPath.empty())
|
||||||
|
{
|
||||||
ExpandPath(m_defaultPath);
|
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);
|
SetBestSize(size);
|
||||||
DoResize();
|
DoResize();
|
||||||
|
Reference in New Issue
Block a user