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:
Dario Sassi
2014-11-18 16:13:19 +00:00
parent 4c68e36219
commit b304c329ef
20 changed files with 362 additions and 131 deletions
+34 -2
View File
@@ -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)