EgtExecutor :
- aggiunta gestione copia di pezzo (Duplo*) in Exe e Lua.
This commit is contained in:
@@ -419,6 +419,22 @@ ExeErase( const INTVECTOR& vIds)
|
||||
for ( size_t i = 0 ; i < vIds.size() ; ++ i) {
|
||||
int nId = (( vIds[i] != GDB_ID_SEL) ? vIds[i] : pGeomDB->GetFirstSelectedObj()) ;
|
||||
while ( nId != GDB_ID_NULL) {
|
||||
// se pezzo con duplicati, cancello anche questi
|
||||
if ( ExeIsPart( nId)) {
|
||||
INTVECTOR vnRef ;
|
||||
pGeomDB->GetInfo( nId, GDB_SI_DUPLIST, vnRef) ;
|
||||
for ( int nDupId : vnRef)
|
||||
pGeomDB->Erase( nDupId) ;
|
||||
}
|
||||
// se altrimenti duplicato di pezzo, lo tolgo da lista duplicati nell'originale
|
||||
else if ( ExeIsDuplo( nId)) {
|
||||
int nOrigId ;
|
||||
pGeomDB->GetInfo( nId, GDB_SI_DUPSOU, nOrigId) ;
|
||||
INTVECTOR vnRef ;
|
||||
pGeomDB->GetInfo( nOrigId, GDB_SI_DUPLIST, vnRef) ;
|
||||
vnRef.erase( remove( vnRef.begin(), vnRef.end(), nId), vnRef.end()) ;
|
||||
pGeomDB->SetInfo( nOrigId, GDB_SI_DUPLIST, vnRef) ;
|
||||
}
|
||||
// cancello
|
||||
if ( ! pGeomDB->Erase( nId))
|
||||
bOk = false ;
|
||||
|
||||
Reference in New Issue
Block a user