TestEGr :

- rami del tree si popolano se oggetti non superano numero limite.
This commit is contained in:
Dario Sassi
2014-04-21 22:00:15 +00:00
parent 6a1486f353
commit 3b24ce0f93
+9 -1
View File
@@ -103,11 +103,11 @@ bool
CTestEGrDlg::InsertGroupOnTree( int nId, HTREEITEM hParent)
{
// inserisco il gruppo nell'albero (se non è la radice)
string sGroup ;
HTREEITEM hGroup ;
if ( nId == GDB_ID_ROOT)
hGroup = hParent ;
else {
string sGroup ;
string sName ;
if ( m_pGeomDB->GetName( nId, sName))
sGroup += sName + " (Group " + ToString( nId) +")" ;
@@ -118,6 +118,14 @@ CTestEGrDlg::InsertGroupOnTree( int nId, HTREEITEM hParent)
return false ;
}
// Se troppi figli, non li visualizzo
int nObjs = m_pGeomDB->GetGroupObjs( nId) ;
if ( nObjs > 16000) {
string sInfo = sGroup + " Too many objects ..." ;
m_Tree.SetItemText( hGroup, stringtoW( sInfo)) ;
return true ;
}
// creo un iteratore
PtrOwner<IGdbIterator> pIter( CreateGdbIterator()) ;
if ( ! ::IsValid( pIter))