EgtExecutor :

- aggiunta gestione copia di pezzo (Duplo*) in Exe e Lua.
This commit is contained in:
Dario Sassi
2021-02-08 08:41:19 +00:00
parent 922dc7912f
commit 541b299948
5 changed files with 347 additions and 1 deletions
+16
View File
@@ -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 ;