Salome HOME
refs #441: crash in digue construction
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_VTKPrsShape.cxx
index 3a841ee33cbc9c67aabb2437ab98256d1321a0a6..4d7bd19e177998e1217192e5bc8218a3517a9e80 100644 (file)
@@ -55,7 +55,7 @@
 
 #include <Precision.hxx>
 
-#include <GEOM_Actor.h>
+#include <HYDROGUI_Actor.h>
 #include <vtkScalarBarActor.h>
 
 #include <QString>
@@ -88,19 +88,18 @@ HYDROGUI_VTKPrsShape::~HYDROGUI_VTKPrsShape()
 //================================================================
 void HYDROGUI_VTKPrsShape::compute()
 {
+  HYDROGUI_VTKPrs::compute();
+
   if ( !getObject().IsNull() )
   {
     buildShape();
 
     if ( !myTopoShape.IsNull() )
     {
-      GEOM_Actor* anActor = GEOM_Actor::New();
+      HYDROGUI_Actor* anActor = getActor<HYDROGUI_Actor>(this);
       anActor->SetShape( myTopoShape, VTK_MIN_DEFLECTION );
       anActor->setDisplayMode( myDisplayMode );
       anActor->setIO( getIO() );
-      AddObject( anActor );
-
-      anActor->Delete();
     }
   }
 }
@@ -301,7 +300,7 @@ void HYDROGUI_VTKPrsShape::setFaces( const TopoDS_Compound& theWires,
   }
 
   myTopoShape = aCompound;
-  myDisplayMode = GEOM_Actor::eShading;
+  //myDisplayMode = GEOM_Actor::eShading;
 }
 
 void HYDROGUI_VTKPrsShape::setFace( const TopoDS_Wire& theWire,
@@ -322,7 +321,7 @@ void HYDROGUI_VTKPrsShape::setFace( const TopoDS_Face& theFace,
                                     const bool         theIsUpdateViewer )
 {
   myTopoShape = theFace;
-  myDisplayMode = GEOM_Actor::eShading;
+  //myDisplayMode = GEOM_Actor::eShading;
 }
 
 void HYDROGUI_VTKPrsShape::setShape( const TopoDS_Shape& theShape,
@@ -330,5 +329,5 @@ void HYDROGUI_VTKPrsShape::setShape( const TopoDS_Shape& theShape,
                                      const bool          theIsUpdateViewer )
 {
   myTopoShape = theShape;
-  myDisplayMode = GEOM_Actor::eShading;
+  //myDisplayMode = GEOM_Actor::eShading;
 }