unsigned int ProjectViewModel::GetChildren( const wxDataViewItem& item, wxDataViewItemArray& items ) const { int count = 0; Asset *pAsset = NULL; if (!item.IsOk()) { ForciblyFullyLoadedPackageManager::GetStaticInstance()->ForceFullyLoadRootPackages(); pAsset = Asset::GetFirstTopLevelAsset(); } else { Asset* pParentAsset = static_cast< Asset* >( item.GetID() ); if ( pParentAsset->IsPackage() ) { ForciblyFullyLoadedPackageManager::GetStaticInstance()->ForceFullyLoadPackage( pParentAsset->GetPath() ); } pAsset = pParentAsset->GetFirstChild(); } while (pAsset) { //if ( m_AssetsInTree.Insert( pAsset ).Second() ) { items.Add( wxDataViewItem( pAsset ) ); ++count; } pAsset = pAsset->GetNextSibling(); } return count; }