Fix bug in wxTreeCtrl::ItemHasChildren() for virtual root item.
Backport of r58177 from trunk, see #11169. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@61830 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1269,6 +1269,12 @@ bool wxTreeCtrl::ItemHasChildren(const wxTreeItemId& item) const
|
||||
{
|
||||
wxCHECK_MSG( item.IsOk(), false, wxT("invalid tree item") );
|
||||
|
||||
if ( IS_VIRTUAL_ROOT(item) )
|
||||
{
|
||||
wxTreeItemIdValue cookie;
|
||||
return GetFirstChild(item, cookie).IsOk();
|
||||
}
|
||||
|
||||
wxTreeViewItem tvItem(item, TVIF_CHILDREN);
|
||||
DoGetItem(&tvItem);
|
||||
|
||||
|
Reference in New Issue
Block a user