From: cconopoima Date: Thu, 30 Mar 2023 14:56:05 +0000 (-0300) Subject: [bos #34270] Fix Length 2D control still displayed after mesh cleared on hypothesis... X-Git-Tag: V9_11_0a1~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=refs%2Ftlpr%2F7%2Fhead;p=modules%2Fsmesh.git [bos #34270] Fix Length 2D control still displayed after mesh cleared on hypothesis change --- diff --git a/src/OBJECT/SMESH_Actor.cxx b/src/OBJECT/SMESH_Actor.cxx index d9e47586c..b5f8aaee4 100644 --- a/src/OBJECT/SMESH_Actor.cxx +++ b/src/OBJECT/SMESH_Actor.cxx @@ -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();