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:
@@ -193,7 +193,9 @@ void wxTreeCtrlBase::ExpandAllChildren(const wxTreeItemId& item)
|
|||||||
{
|
{
|
||||||
// expand this item first, this might result in its children being added on
|
// expand this item first, this might result in its children being added on
|
||||||
// the fly
|
// 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
|
// then (recursively) expand all the children
|
||||||
wxTreeItemIdValue cookie;
|
wxTreeItemIdValue cookie;
|
||||||
|
Reference in New Issue
Block a user