From e660f922f646d5f0dad74ba1616113a8769342fe Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 15 Aug 2007 13:09:19 +0000 Subject: [PATCH] don't assert when ExpandAll() is called on hidden root item (fixes 1765566, replaces patch 1768282) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48097 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/treebase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/common/treebase.cpp b/src/common/treebase.cpp index f10e2af927..eb37c0dbdb 100644 --- a/src/common/treebase.cpp +++ b/src/common/treebase.cpp @@ -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; -- 2.47.2