EgtGeomKernel 1.5j6 :
- corretta e migliorata gestione ID delle entità.
This commit is contained in:
+18
-1
@@ -13,6 +13,7 @@
|
||||
|
||||
//--------------------------- Include ----------------------------------------
|
||||
#include "stdafx.h"
|
||||
#include "GeomDB.h"
|
||||
#include "GdbObj.h"
|
||||
#include "GdbGroup.h"
|
||||
#include "Attribs.h"
|
||||
@@ -25,16 +26,27 @@ using namespace std ;
|
||||
//----------------------------------------------------------------------------
|
||||
GdbObj::GdbObj( void)
|
||||
: m_nId( GDB_ID_NULL), m_pAttribs( nullptr),
|
||||
m_pNext( nullptr), m_pPrev( nullptr), m_pParent( nullptr)
|
||||
m_pGDB( nullptr), m_pNext( nullptr), m_pPrev( nullptr), m_pParent( nullptr)
|
||||
{
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
GdbObj::~GdbObj( void)
|
||||
{
|
||||
// cancello gli attributi
|
||||
if ( m_pAttribs != nullptr)
|
||||
delete m_pAttribs ;
|
||||
m_pAttribs = nullptr ;
|
||||
// aggiorno managers del Db geometrico di appartenenza
|
||||
if ( m_pGDB != nullptr) {
|
||||
// elimino da mappa dei nomi
|
||||
m_pGDB->m_IdManager.RemoveObj( m_nId) ;
|
||||
// eliminazione eventuale da lista dei selezionati
|
||||
m_pGDB->m_SelManager.RemoveObj( this) ;
|
||||
// sistemazioni in eventuali GdbIterator con quell'oggetto corrente
|
||||
m_pGDB->m_IterManager.ResetObjIfSame( this) ;
|
||||
}
|
||||
m_pGDB = nullptr ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
@@ -60,6 +72,11 @@ GdbObj::CopyFrom( const GdbObj* pSou)
|
||||
m_pAttribs = pSou->m_pAttribs->Clone() ;
|
||||
if ( m_pAttribs == nullptr)
|
||||
return false ;
|
||||
// se selezionato, deve diventare solo visibile
|
||||
if ( m_pAttribs->GetStatus() == GDB_ST_SEL)
|
||||
m_pAttribs->SetStatus( GDB_ST_ON) ;
|
||||
// marcatura sempre disabilitata
|
||||
m_pAttribs->ResetMark() ;
|
||||
}
|
||||
|
||||
return true ;
|
||||
|
||||
Reference in New Issue
Block a user