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
This commit is contained in:
Vadim Zeitlin
2007-08-15 13:09:19 +00:00
parent bcac816123
commit e660f922f6

View 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;