From ef57807f2789ef9495912bd323541b85b9f0d51e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 3 Dec 2010 14:12:23 +0000 Subject: [PATCH] Rename wxGenericDirCtrl::ExpandDir() to PopulateNode(). This function doesn't really expand anything (unlike CollapseDir()) so give it a better name while keeping the old one too for compatibility. See #12735. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@66315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/dirctrlg.h | 2 ++ src/generic/dirctrlg.cpp | 8 +++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/wx/generic/dirctrlg.h b/include/wx/generic/dirctrlg.h index 8d9a3cef5d..9b8eeff566 100644 --- a/include/wx/generic/dirctrlg.h +++ b/include/wx/generic/dirctrlg.h @@ -189,6 +189,8 @@ protected: bool ExtractWildcard(const wxString& filterStr, int n, wxString& filter, wxString& description); private: + void PopulateNode(wxTreeItemId node); + bool m_showHidden; wxTreeItemId m_rootId; wxString m_defaultPath; // Starting path diff --git a/src/generic/dirctrlg.cpp b/src/generic/dirctrlg.cpp index 0ee1c0b2f8..a87c0812ca 100644 --- a/src/generic/dirctrlg.cpp +++ b/src/generic/dirctrlg.cpp @@ -788,7 +788,7 @@ void wxGenericDirCtrl::CollapseDir(wxTreeItemId parentId) m_treeCtrl->Thaw(); } -void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId) +void wxGenericDirCtrl::PopulateNode(wxTreeItemId parentId) { wxDirItemData *data = (wxDirItemData *) m_treeCtrl->GetItemData(parentId); @@ -935,6 +935,12 @@ void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId) } } +void wxGenericDirCtrl::ExpandDir(wxTreeItemId parentId) +{ + // ExpandDir() will not actually expand the tree node, just populate it + PopulateNode(parentId); +} + void wxGenericDirCtrl::ReCreateTree() { CollapseDir(m_treeCtrl->GetRootItem()); -- 2.45.2