EgtMachKernel 1.6r5 :
- modifica per rimettere i grezzi unlinked da gruppi macchina e di fase 1 sempre all'inizio del loro gruppo.
This commit is contained in:
+10
-2
@@ -894,6 +894,13 @@ Machine::LinkRawPartToGroup( int nRawPartId, const std::string& sGroupName)
|
||||
return true ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::IsLinkedRawPart( int nRawId) const
|
||||
{
|
||||
return ( find( m_vLinkedRawParts.begin(), m_vLinkedRawParts.end(), nRawId) != m_vLinkedRawParts.end()) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
Machine::UnlinkRawPartFromGroup( int nRawPartId)
|
||||
@@ -909,8 +916,9 @@ Machine::UnlinkRawPartFromGroup( int nRawPartId)
|
||||
auto iIter = find( m_vLinkedRawParts.begin(), m_vLinkedRawParts.end(), nRawPartId) ;
|
||||
if ( iIter == m_vLinkedRawParts.end())
|
||||
return false ;
|
||||
// riporto il grezzo nel gruppo dei grezzi
|
||||
if ( ! m_pGeomDB->RelocateGlob( nRawPartId, nRawGrpId))
|
||||
// riporto il grezzo nel gruppo dei grezzi (se appartiene alla prima fase in testa)
|
||||
int nInsPos = ( m_pMchMgr->VerifyRawPartPhase( nRawPartId, 1) ? GDB_FIRST_SON : GDB_LAST_SON) ;
|
||||
if ( ! m_pGeomDB->RelocateGlob( nRawPartId, nRawGrpId, nInsPos))
|
||||
return false ;
|
||||
// tolgo il grezzo dall'elenco dei linkati
|
||||
m_vLinkedRawParts.erase( iIter) ;
|
||||
|
||||
Reference in New Issue
Block a user