Salome HOME
Small hack to update the mesh representation after succeded mesh creation in the... cce/29159 3/head
authorcconopoima <cesar.conopoima@gmail.com>
Mon, 20 Mar 2023 16:04:55 +0000 (13:04 -0300)
committercconopoima <cesar.conopoima@gmail.com>
Mon, 20 Mar 2023 16:04:55 +0000 (13:04 -0300)
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_ActorDef.h

index 1d0400ce20925081a17606289449d298f477c36b..e61144f6b04299ef099f77ed6b77c537bd1d734b 100644 (file)
@@ -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
index d19a001e302e89fb299379c1f696ef53ee1cfcf4..757b47a197bdd5188c1fc60db9ad69dd741850b7 100644 (file)
@@ -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;