TestEGr :
- rami del tree si popolano se oggetti non superano numero limite.
This commit is contained in:
+9
-1
@@ -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))
|
||||
|
||||
Reference in New Issue
Block a user