TestEgr :
- migliorato Tree con visualizzazione nome entità.
This commit is contained in:
+8
-4
@@ -194,18 +194,22 @@ bool
|
||||
CTestEGrDlg::InsertGeoObjInTree( int nId, IGeoObj* pGeoObj, HTREEITEM hParent)
|
||||
{
|
||||
int nImage ;
|
||||
string sName ;
|
||||
string sObj ;
|
||||
|
||||
if ( pGeoObj != nullptr) {
|
||||
sName = pGeoObj->GetTitle() + " " + ToString( nId) ;
|
||||
string sName ;
|
||||
if ( m_pGeomDB->GetName( nId, sName))
|
||||
sObj += sName + " (" + pGeoObj->GetTitle() + " " + ToString( nId) +")" ;
|
||||
else
|
||||
sObj = pGeoObj->GetTitle() + " " + ToString( nId) ;
|
||||
nImage = GetGeoObjImage( pGeoObj->GetType()) ;
|
||||
}
|
||||
else {
|
||||
nImage = ICO_NOGEO ;
|
||||
sName = "Null " + ToString( nId) ;
|
||||
sObj = "Null " + ToString( nId) ;
|
||||
}
|
||||
|
||||
HTREEITEM hItem = m_Tree.InsertItem( stringtoW( sName), nImage, nImage, hParent) ;
|
||||
HTREEITEM hItem = m_Tree.InsertItem( stringtoW( sObj), nImage, nImage, hParent) ;
|
||||
return ( hItem != nullptr && m_Tree.SetItemData( hItem, nId) != 0) ;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user