EgtExecutor :

- modifiche per filtri selezione anche in DB geometrico.
This commit is contained in:
Dario Sassi
2016-09-26 13:48:25 +00:00
parent f320cca818
commit cabb0ac300
5 changed files with 98 additions and 20 deletions
+25 -11
View File
@@ -365,8 +365,9 @@ ExeEraseEmptyParts( void)
bool
ExeSelectPartObjs( int nPartId)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_GEOMDB( pGseCtx, false)
IGeomDB* pGeomDB = pGseCtx->m_pGeomDB ;
bool bOk = true ;
// verifico sia veramente un pezzo
if ( ExeIsPart( nPartId)) {
@@ -374,11 +375,22 @@ ExeSelectPartObjs( int nPartId)
int nId = pGeomDB->GetFirstInGroup( nPartId) ;
while ( nId != GDB_ID_NULL) {
// se è gruppo seleziono i suoi componenti
if ( pGeomDB->GetGdbType( nId) == GDB_TY_GROUP)
pGeomDB->SelectGroupObjs( nId) ;
// altrimenti lo seleziono direttamente
else
pGeomDB->SelectObj( nId) ;
if ( pGeomDB->GetGdbType( nId) == GDB_TY_GROUP) {
// ciclo sugli oggetti del layer
int nId2 = pGeomDB->GetFirstInGroup( nId) ;
while ( nId2 != GDB_ID_NULL) {
// se selezionabile, seleziono
if ( ( pGeomDB->GetGeoType( nId2) & pGseCtx->m_nObjFilterForSelect) != 0)
pGeomDB->SelectObj( nId2) ;
// passo al successivo
nId2 = pGeomDB->GetNext( nId2) ;
}
}
// altrimenti, se selezionabile lo seleziono direttamente
else {
if ( ( pGeomDB->GetGeoType( nId) & pGseCtx->m_nObjFilterForSelect) != 0)
pGeomDB->SelectObj( nId) ;
}
// passo al successivo
nId = pGeomDB->GetNext( nId) ;
}
@@ -433,16 +445,18 @@ ExeDeselectPartObjs( int nPartId)
bool
ExeSelectLayerObjs( int nLayerId)
{
IGeomDB* pGeomDB = GetCurrGeomDB() ;
VERIFY_GEOMDB( pGeomDB, false)
GseContext* pGseCtx = GetCurrGseContext() ;
VERIFY_CTX_GEOMDB( pGseCtx, false)
IGeomDB* pGeomDB = pGseCtx->m_pGeomDB ;
bool bOk = true ;
// verifico sia veramente un layer
if ( ExeIsLayer( nLayerId)) {
// ciclo sugli oggetti del layer
int nId = pGeomDB->GetFirstInGroup( nLayerId) ;
while ( nId != GDB_ID_NULL) {
// seleziono
pGeomDB->SelectObj( nId) ;
// se selezionabile, seleziono
if ( ( pGeomDB->GetGeoType( nId) & pGseCtx->m_nObjFilterForSelect) != 0)
pGeomDB->SelectObj( nId) ;
// passo al successivo
nId = pGeomDB->GetNext( nId) ;
}