]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/treebase.cpp
Added missing wxBitmapComboBox::Insert() implementation
[wxWidgets.git] / src / common / treebase.cpp
index e573f9cec926a0e2699193529d86aa4e86ae9f96..57cfed1d197ac6eb8e2a59a72fefbbfd9821bc4d 100644 (file)
@@ -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();
 }