EgtExecutor 2.7h1 :
- se si cambia il modo di visualizzare insiemi di triangoli con ExeSetShowTriaAdv si invalidano tutti gli oggetti grafici.
This commit is contained in:
+28
-2
@@ -431,14 +431,40 @@ ExeGetShowCurveDirection( void)
|
||||
return pScene->GetShowCurveDirection() ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
static bool
|
||||
MyResetGroupObjGraphics( IGeomDB* pGDB, int nGroupId)
|
||||
{
|
||||
int nEntId = pGDB->GetFirstInGroup( nGroupId) ;
|
||||
while ( nEntId != GDB_ID_NULL) {
|
||||
if ( pGDB->GetGdbType( nEntId) == GDB_TY_GROUP) {
|
||||
MyResetGroupObjGraphics( pGDB, nEntId) ;
|
||||
}
|
||||
else {
|
||||
IGeoObj* pGeoObj = pGDB->GetGeoObj( nEntId) ;
|
||||
if ( pGeoObj != nullptr)
|
||||
pGeoObj->SetObjGraphics( nullptr) ;
|
||||
}
|
||||
nEntId = pGDB->GetNext( nEntId) ;
|
||||
}
|
||||
return true ;
|
||||
}
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
bool
|
||||
ExeSetShowTriaAdv( bool bAdvanced, bool bRedraw)
|
||||
{
|
||||
IEGrScene* pScene = GetCurrScene() ;
|
||||
VERIFY_SCENE( pScene, false)
|
||||
// imposto stato
|
||||
pScene->SetShowTriaAdvanced( bAdvanced) ;
|
||||
// se cambiato, imposto stato
|
||||
if ( pScene->GetShowTriaAdvanced() != bAdvanced) {
|
||||
// imposto il nuovo stato
|
||||
pScene->SetShowTriaAdvanced( bAdvanced) ;
|
||||
// forzo ricalcolo della grafica di tutti gli oggetti
|
||||
IGeomDB* pGDB = pScene->GetGeomDB() ;
|
||||
if ( pGDB != nullptr)
|
||||
MyResetGroupObjGraphics( pGDB, GDB_ID_ROOT) ;
|
||||
}
|
||||
if ( bRedraw)
|
||||
pScene->RedrawWindow() ;
|
||||
return TRUE ;
|
||||
|
||||
Binary file not shown.
Reference in New Issue
Block a user