From 1a51c85ff3bb522ffeb983422ca9a878c0b22ca1 Mon Sep 17 00:00:00 2001
From: Robin Dunn <robin@alldunn.com>
Date: Mon, 3 Jul 2006 20:55:39 +0000
Subject: [PATCH] ExpandAll and ExpandAllChildren are in wxTreeCtrlBase now.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
---
 include/wx/generic/treectlg.h |  2 --
 src/generic/treectlg.cpp      | 21 +--------------------
 2 files changed, 1 insertion(+), 22 deletions(-)

diff --git a/include/wx/generic/treectlg.h b/include/wx/generic/treectlg.h
index e6df2ee56c..f72b8fc465 100644
--- a/include/wx/generic/treectlg.h
+++ b/include/wx/generic/treectlg.h
@@ -180,8 +180,6 @@ public:
 
     wxTreeItemId GetNext(const wxTreeItemId& item) const;
 
-    void ExpandAll(const wxTreeItemId& item);
-
 #if WXWIN_COMPATIBILITY_2_6
     // use EditLabel() instead
     void Edit( const wxTreeItemId& item ) { EditLabel(item); }
diff --git a/src/generic/treectlg.cpp b/src/generic/treectlg.cpp
index f968f6a9b8..eaea98d3ba 100644
--- a/src/generic/treectlg.cpp
+++ b/src/generic/treectlg.cpp
@@ -1628,25 +1628,6 @@ void wxGenericTreeCtrl::Expand(const wxTreeItemId& itemId)
     ProcessEvent( event );
 }
 
-void wxGenericTreeCtrl::ExpandAll(const wxTreeItemId& item)
-{
-    if ( !HasFlag(wxTR_HIDE_ROOT) || item != GetRootItem())
-    {
-        Expand(item);
-        if ( !IsExpanded(item) )
-            return;
-    }
-
-    wxTreeItemIdValue cookie;
-    wxTreeItemId child = GetFirstChild(item, cookie);
-    while ( child.IsOk() )
-    {
-        ExpandAll(child);
-
-        child = GetNextChild(item, cookie);
-    }
-}
-
 void wxGenericTreeCtrl::Collapse(const wxTreeItemId& itemId)
 {
     wxCHECK_RET( !HasFlag(wxTR_HIDE_ROOT) || itemId != GetRootItem(),
@@ -2620,7 +2601,7 @@ void wxGenericTreeCtrl::OnChar( wxKeyEvent &event )
             if ( !IsExpanded(m_current) )
             {
                 // expand all
-                ExpandAll(m_current);
+                ExpandAllChildren(m_current);
                 break;
             }
             //else: fall through to Collapse() it
-- 
2.47.2