wxTreeCtrl::ItemHasChildren() should return TRUE if SetItemHasChildren() had been called

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@7850 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-07-26 16:29:33 +00:00
parent ba305d2c09
commit b0f8234dd5

View File

@@ -803,7 +803,9 @@ bool wxTreeCtrl::ItemHasChildren(const wxTreeItemId& item) const
{
wxCHECK_MSG( item.IsOk(), FALSE, wxT("invalid tree item") );
return !item.m_pItem->GetChildren().IsEmpty();
// return TRUE if SetItemHasChildren() had been called before (i.e. the
// item has a [+] button)
return item.m_pItem->HasPlus() || !item.m_pItem->GetChildren().IsEmpty();
}
bool wxTreeCtrl::IsExpanded(const wxTreeItemId& item) const