Salome HOME
INT PAL 0052682: Local selection for ball elements has incorrect size
authorimn <imn@opencascade.com>
Fri, 17 Apr 2015 08:02:17 +0000 (11:02 +0300)
committerimn <imn@opencascade.com>
Fri, 17 Apr 2015 08:02:17 +0000 (11:02 +0300)
src/OBJECT/SMESH_Actor.cxx
src/OBJECT/SMESH_SVTKActor.cxx
src/OBJECT/SMESH_SVTKActor.h

index 045bb9c..65f9e87 100644 (file)
@@ -2116,6 +2116,14 @@ double SMESH_ActorDef::GetBallScale()
 void SMESH_ActorDef::SetBallScale( double theVal )
 {
   myBallActor->SetBallScale( theVal );
+  if(SMESH_SVTKActor* aCustom = SMESH_SVTKActor::SafeDownCast( myHighlightActor )) {
+    aCustom->SetBallScale(theVal);
+  }
+  if(SMESH_SVTKActor* aCustom = SMESH_SVTKActor::SafeDownCast( myPreHighlightActor )) {
+    aCustom->SetBallScale(theVal);
+  }
+
+  Modified();
 }
 
 int SMESH_ActorDef::GetObjDimension( const int theObjId )
index 1b21525..4503dd1 100644 (file)
@@ -197,6 +197,10 @@ void SMESH_SVTKActor::SetBallSize(float theSize) {
   myBallActor->GetProperty()->SetPointSize(theSize);
 }
 
+void SMESH_SVTKActor::SetBallScale(double theScale) {
+  myBallActor->SetBallScale(theScale);
+}
+
 void SMESH_SVTKActor::SetVisualObject(TVisualObjPtr theVisualObj) {
   myVisualObj = theVisualObj;
 }
index 42ebbe5..fa9b512 100644 (file)
@@ -43,6 +43,7 @@ public:
 
   vtkTypeMacro(SMESH_SVTKActor, SVTK_Actor);
 
+  void SetBallScale(double theSize);
   void SetBallSize(float theSize);
   void Set0DSize(float theSize);