EgtGeomKernel 1.5k1 :
- aggiunta estensione di curve agli estremi di data lunghezza - a selezione oggetto aggiunto flag per farlo solo se già visibile - possibilità di ciclare gli oggetti selezionati a ritroso - a tutti gli oggetti Geo aggiunto il costruttore di copia.
This commit is contained in:
+34
-2
@@ -1233,12 +1233,19 @@ GeomDB::ShearGroup( int nId, const Point3d& ptOn, const Vector3d& vtNorm, const
|
||||
// Selection
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GeomDB::SelectObj( int nId)
|
||||
GeomDB::SelectObj( int nId, bool bOnlyIfVisible)
|
||||
{
|
||||
// recupero l'oggetto
|
||||
GdbObj* pGdbObj = GetGdbObj( nId) ;
|
||||
if ( pGdbObj == nullptr)
|
||||
return false ;
|
||||
// se richiesta verifica visibilità
|
||||
if ( bOnlyIfVisible) {
|
||||
int nOldStat = GDB_ST_ON ;
|
||||
pGdbObj->GetCalcStatus( nOldStat) ;
|
||||
if ( nOldStat == GDB_ST_OFF)
|
||||
return true ;
|
||||
}
|
||||
|
||||
return SetStatus( pGdbObj, GDB_ST_SEL) ;
|
||||
}
|
||||
@@ -1262,7 +1269,7 @@ GeomDB::DeselectObj( int nId)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GeomDB::SelectGroupObjs( int nId, int nFilter)
|
||||
GeomDB::SelectGroupObjs( int nId, int nFilter, bool bOnlyIfVisible)
|
||||
{
|
||||
// recupero il gruppo Gdb
|
||||
GdbGroup* pGdbGroup ;
|
||||
@@ -1283,6 +1290,13 @@ GeomDB::SelectGroupObjs( int nId, int nFilter)
|
||||
if ( pGObj == nullptr || pGObj->GetType() != nFilter)
|
||||
continue ;
|
||||
}
|
||||
// se richiesta verifica visibilità
|
||||
if ( bOnlyIfVisible) {
|
||||
int nOldStat = GDB_ST_ON ;
|
||||
pGdbObj->GetCalcStatus( nOldStat) ;
|
||||
if ( nOldStat == GDB_ST_OFF)
|
||||
continue ;
|
||||
}
|
||||
// eseguo selezione
|
||||
if ( ! SetStatus( pGdbObj, GDB_ST_SEL))
|
||||
return false ;
|
||||
@@ -1350,6 +1364,24 @@ GeomDB::GetNextSelectedObj( void) const
|
||||
return (( pGObj == nullptr) ? GDB_ID_NULL : pGObj->m_nId) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
GeomDB::GetLastSelectedObj( void) const
|
||||
{
|
||||
GdbObj* pGObj = m_SelManager.GetLastObj() ;
|
||||
|
||||
return (( pGObj == nullptr) ? GDB_ID_NULL : pGObj->m_nId) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
int
|
||||
GeomDB::GetPrevSelectedObj( void) const
|
||||
{
|
||||
GdbObj* pGObj = m_SelManager.GetPrevObj() ;
|
||||
|
||||
return (( pGObj == nullptr) ? GDB_ID_NULL : pGObj->m_nId) ;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GeomDB::ClearSelection( void)
|
||||
|
||||
Reference in New Issue
Block a user