]> git.saurik.com Git - wxWidgets.git/commitdiff
don't assert when ExpandAll() is called on hidden root item (fixes 1765566, replaces...
authorVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Aug 2007 13:09:19 +0000 (13:09 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Wed, 15 Aug 2007 13:09:19 +0000 (13:09 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/treebase.cpp

index f10e2af927b24c6b40ecdf0924b6bead4fb33566..eb37c0dbdb1aef6c7fa7520b31cf62d2f906bbed 100644 (file)
@@ -193,7 +193,9 @@ void wxTreeCtrlBase::ExpandAllChildren(const wxTreeItemId& item)
 {
     // expand this item first, this might result in its children being added on
     // the fly
-    Expand(item);
+    if ( item != GetRootItem() || !HasFlag(wxTR_HIDE_ROOT) )
+        Expand(item);
+    //else: expanding hidden root item is unsupported and unnecessary
 
     // then (recursively) expand all the children
     wxTreeItemIdValue cookie;