git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@12958
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
{
wxCHECK_MSG( item.IsOk(), FALSE, wxT("invalid tree item") );
{
wxCHECK_MSG( item.IsOk(), FALSE, wxT("invalid tree item") );
- return !((wxGenericTreeItem*) item.m_pItem)->GetChildren().IsEmpty();
+ // consider that the item does have children if it has the "+" button: it
+ // might not have them (if it had never been expanded yet) but then it
+ // could have them as well and it's better to err on this side rather than
+ // disabling some operations which are restricted to the items with
+ // children for an item which does have them
+ return !((wxGenericTreeItem*) item.m_pItem)->HasPlus();
}
bool wxGenericTreeCtrl::IsExpanded(const wxTreeItemId& item) const
}
bool wxGenericTreeCtrl::IsExpanded(const wxTreeItemId& item) const