diff --git a/EgtMachKernel.rc b/EgtMachKernel.rc index 89845e5..073f58c 100644 Binary files a/EgtMachKernel.rc and b/EgtMachKernel.rc differ diff --git a/MachMgrRawParts.cpp b/MachMgrRawParts.cpp index 39c78fa..271d1a7 100644 --- a/MachMgrRawParts.cpp +++ b/MachMgrRawParts.cpp @@ -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