Misc mods for feedback from Marcin Wojdyr <wojdyr@if.pw.edu.pl>

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16702 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart
2002-08-23 11:57:10 +00:00
parent fde719f935
commit 1fc32b12ee
5 changed files with 17 additions and 13 deletions

View File

@@ -1496,17 +1496,20 @@ void wxGenericTreeCtrl::Expand(const wxTreeItemId& itemId)
void wxGenericTreeCtrl::ExpandAll(const wxTreeItemId& item)
{
Expand(item);
if ( IsExpanded(item) )
if ( !HasFlag(wxTR_HIDE_ROOT) || item != GetRootItem())
{
long cookie;
wxTreeItemId child = GetFirstChild(item, cookie);
while ( child.IsOk() )
{
ExpandAll(child);
child = GetNextChild(item, cookie);
}
Expand(item);
if ( !IsExpanded(item) )
return;
}
long cookie;
wxTreeItemId child = GetFirstChild(item, cookie);
while ( child.IsOk() )
{
ExpandAll(child);
child = GetNextChild(item, cookie);
}
}