EgtMachKernel 1.6n7 :

- alla rimozione di un grezzo si rimuove la registrazione dei suoi movimenti.
This commit is contained in:
Dario Sassi
2016-02-18 10:48:24 +00:00
parent a9d9d63678
commit 2507fb2de5
2 changed files with 10 additions and 0 deletions
BIN
View File
Binary file not shown.
+10
View File
@@ -537,6 +537,10 @@ MachMgr::RemoveRawPartFromCurrPhase( int nRawId)
RemoveRawPart( nRawId) ;
// altrimenti
else {
// tolgo dalla disposizione corrente gli eventuali movimenti registrati di questo grezzo
Disposition* pDisp = GetDisposition( m_pGeomDB->GetUserObj( GetPhaseDisposition( m_nCurrPhase))) ;
if ( pDisp != nullptr)
pDisp->RemoveRawPart( nRawId) ;
// aggiorno l'elenco delle fasi di appartenenza
vPhase.erase( iIter) ;
m_pGeomDB->SetInfo( nRawId, MACH_RAW_PHASE, vPhase) ;
@@ -554,6 +558,12 @@ MachMgr::RemoveRawPart( int nRawId)
// verifica validità grezzo
if ( ! VerifyRawPart( nRawId))
return false ;
// tolgo dalle disposizioni in cui compare gli eventuali movimenti registrati di questo grezzo
for ( int nPhase = 1 ; nPhase <= m_nPhasesCount ; ++ nPhase) {
Disposition* pDisp = GetDisposition( m_pGeomDB->GetUserObj( GetPhaseDisposition( nPhase))) ;
if ( pDisp != nullptr)
pDisp->RemoveRawPart( nRawId) ;
}
// devo estrarre i pezzi e riportarli in lista generale
SwapRawPartParts( nRawId, false) ;
// cancello il grezzo