From: cconopoima Date: Mon, 20 Mar 2023 16:04:55 +0000 (-0300) Subject: Small hack to update the mesh representation after succeded mesh creation in the... X-Git-Tag: V9_11_0a1~17^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7ce6e800256c653b878d88163ff8576d16ed5a27;p=modules%2Fsmesh.git Small hack to update the mesh representation after succeded mesh creation in the case the first call to mesh creation failed. --- 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;