diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index 1d0400ce2..e61144f6b 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -120,6 +120,7 @@ SMESH_ActorDef::SMESH_ActorDef() myIsPointsVisible = false; myIsEntityModeCache = false; myRepresentationCache = 0; + objectEntitiesCache = 0; myHighlightActor = SMESH_SVTKActor::New(); myHighlightActor->Delete(); // vtkSmartPointer! @@ -1647,6 +1648,12 @@ void SMESH_ActorDef::SetEntityMode(unsigned int theMode) SetRepresentation( ePoint ); } + if ( anObjectEntities != 0 && objectEntitiesCache == 0 ) + { + objectEntitiesCache = anObjectEntities; + SetRepresentation( eSurface ); + } + if ( myEntityMode != theMode ) { myEntityMode = theMode; // entities to show diff --git a/src/OBJECT/SMESH_ActorDef.h b/src/OBJECT/SMESH_ActorDef.h index d19a001e3..757b47a19 100644 --- a/src/OBJECT/SMESH_ActorDef.h +++ b/src/OBJECT/SMESH_ActorDef.h @@ -296,6 +296,7 @@ class SMESH_ActorDef : public SMESH_Actor unsigned int myEntityMode; unsigned int myEntityModeCache; + unsigned int objectEntitiesCache; int myRepresentationCache; bool myIsEntityModeCache; bool myIsPointsVisible;