Added wxDataViewModel::GetChildren() (removed GetSibling() and GetFirstChild())

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@48508 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
2007-08-31 09:44:59 +00:00
parent b04fcede8f
commit 74fe973bba
5 changed files with 37 additions and 68 deletions

View File

@@ -2380,17 +2380,19 @@ void wxDataViewCtrlInternal::BuildBranch( wxGtkTreeModelNode *node )
{
if (node->GetChildCount() == 0)
{
wxDataViewItem child = m_wx_model->GetFirstChild( node->GetItem() );
while (child.IsOk())
wxDataViewItemArray children;
unsigned int count = m_wx_model->GetChildren( node->GetItem(), children );
unsigned int pos;
for (pos = 0; pos < count; pos++)
{
wxDataViewItem child = children[pos];
if (m_wx_model->IsContainer( child ))
node->AddNode( new wxGtkTreeModelNode( node, child, this ) );
else
node->AddLeave( child.GetID() );
// Don't send any events here
child = m_wx_model->GetNextSibling( child );
}
}
}