]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
[bos #34270] Fix Length 2D control still displayed after mesh cleared on hypothesis... cce/34270 7/head
authorcconopoima <cesar.conopoima@gmail.com>
Thu, 30 Mar 2023 14:56:05 +0000 (11:56 -0300)
committerChristophe Bourcier <christophe.bourcier@cea.fr>
Fri, 21 Apr 2023 07:12:59 +0000 (09:12 +0200)
src/OBJECT/SMESH_Actor.cxx

index d9e47586c42f180086b608d097df2083ef781945..b5f8aaee4a8c43f297a049f86be513fd14a0ac59 100644 (file)
@@ -1508,12 +1508,14 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation)
   my3DExtActor->VisibilityOff();
 
   myScalarBarActor->VisibilityOff();
+  
 
   if ( GetVisibility() ) {
     if ( theIsUpdateRepersentation )
       SetRepresentation(GetRepresentation());
-
-    if(myControlMode != eNone) {
+  
+    // Avoid calling VisibilityOn of ExtActor after editing hypothesis. Use the same criteria than scalarBarActor
+    if( myControlMode != eNone && myFunctor && myVisualObj->GetNbEntities( myFunctor->GetType() ) ) { 
       switch(myControlMode) {
       case eFreeNodes:
       case eCoincidentNodes:
@@ -1543,9 +1545,8 @@ void SMESH_ActorDef::SetVisibility(int theMode, bool theIsUpdateRepersentation)
         break;
       default:;
       }
-      if ( myFunctor && myVisualObj->GetNbEntities( myFunctor->GetType() ))
-        myScalarBarActor->VisibilityOn();
-    }
+      myScalarBarActor->VisibilityOn();
+    }    
 
     if ( GetPickable( ))
       myPickableActor->VisibilityOn();