X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/9248adc8da5476a48d6e0263f4683b87f7b899d4..198be845897a79ba350ae7f93db536ddb2eccfb2:/src/common/treebase.cpp 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;