]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/treebase.cpp
Fix history in wxWebViewIE when using a custom file scheme.
[wxWidgets.git] / src / common / treebase.cpp
index e573f9cec926a0e2699193529d86aa4e86ae9f96..483360b4724a6e8401625c5ca14113b6cb9b8781 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        treebase.cpp
+// Name:        src/common/treebase.cpp
 // Purpose:     Base wxTreeCtrl classes
 // Author:      Julian Smart
 // Created:     01/02/97
@@ -323,8 +323,10 @@ void wxTreeCtrlBase::CollapseAllChildren(const wxTreeItemId& item)
         CollapseAllChildren(idCurr);
     }
 
-    // then collapse this element too
-    Collapse(item);
+    // then collapse this element too unless it's the hidden root which can't
+    // be collapsed
+    if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) )
+        Collapse(item);
     Thaw();
 }