EgtGeomKernel :
- deselezione ora riporta allo stato precedente a selezione - a CurveComposite aggiunte Set/GetCurveTempProp .
This commit is contained in:
+8
-4
@@ -1709,7 +1709,7 @@ GeomDB::DeselectObj( int nId)
|
||||
|
||||
// se selezionato, lo deseleziono
|
||||
if ( pGdbObj->IsSelected())
|
||||
return SetStatus( pGdbObj, GDB_ST_ON) ;
|
||||
return RevertStatus( pGdbObj, false) ;
|
||||
// altrimenti, va già bene
|
||||
else
|
||||
return true ;
|
||||
@@ -1768,7 +1768,7 @@ GeomDB::DeselectGroupObjs( int nId)
|
||||
while ( pGdbObj != nullptr) {
|
||||
// se selezionato, lo deseleziono
|
||||
if ( pGdbObj->IsSelected()) {
|
||||
if ( ! SetStatus( pGdbObj, GDB_ST_ON))
|
||||
if ( ! RevertStatus( pGdbObj, false))
|
||||
return false ;
|
||||
}
|
||||
pGdbObj = pGdbObj->GetNext() ;
|
||||
@@ -1839,7 +1839,7 @@ GeomDB::ClearSelection( void)
|
||||
GdbObj* pGObj = m_SelManager.GetFirstObj() ;
|
||||
while ( pGObj != nullptr) {
|
||||
m_SelManager.RemoveObj( pGObj) ;
|
||||
pGObj->SetStatus( GDB_ST_ON) ;
|
||||
RevertStatus( pGObj, false) ;
|
||||
pGObj = m_SelManager.GetFirstObj() ;
|
||||
}
|
||||
|
||||
@@ -2041,7 +2041,7 @@ GeomDB::RevertStatus( int nId)
|
||||
|
||||
//----------------------------------------------------------------------------
|
||||
bool
|
||||
GeomDB::RevertStatus( GdbObj* pGdbObj)
|
||||
GeomDB::RevertStatus( GdbObj* pGdbObj, bool bOkSel)
|
||||
{
|
||||
// verifico validità oggetto
|
||||
if ( pGdbObj == nullptr)
|
||||
@@ -2059,6 +2059,10 @@ GeomDB::RevertStatus( GdbObj* pGdbObj)
|
||||
int nStat = GDB_ST_ON ;
|
||||
pGdbObj->GetStatus( nStat) ;
|
||||
|
||||
// se inibito ritorno a selezionato e selezionato, imposto visibile
|
||||
if ( ! bOkSel && nStat == GDB_ST_SEL)
|
||||
pGdbObj->SetStatus( GDB_ST_ON) ;
|
||||
|
||||
// se lo stato è cambiato
|
||||
if ( nStat != nOldStat) {
|
||||
// se il nuovo stato è di selezionato, inserisco oggetto in lista selezionati
|
||||
|
||||
Reference in New Issue
Block a user