From 7ce6e800256c653b878d88163ff8576d16ed5a27 Mon Sep 17 00:00:00 2001 From: cconopoima Date: Mon, 20 Mar 2023 13:04:55 -0300 Subject: [PATCH] Small hack to update the mesh representation after succeded mesh creation in the case the first call to mesh creation failed. --- src/OBJECT/SMESH_Actor.cxx | 7 +++++++ src/OBJECT/SMESH_ActorDef.h | 1 + 2 files changed, 8 insertions(+) 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; -- 2.30.2