Salome HOME
refs #441: crash in digue construction
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_VTKPrsShape.cxx
index c1a20685c7c094d8a0af5bf2e0d06d90e54adb07..4d7bd19e177998e1217192e5bc8218a3517a9e80 100644 (file)
@@ -88,22 +88,18 @@ HYDROGUI_VTKPrsShape::~HYDROGUI_VTKPrsShape()
 //================================================================
 void HYDROGUI_VTKPrsShape::compute()
 {
+  HYDROGUI_VTKPrs::compute();
+
   if ( !getObject().IsNull() )
   {
     buildShape();
 
     if ( !myTopoShape.IsNull() )
     {
-      HYDROGUI_Actor* anActor = HYDROGUI_Actor::New();
+      HYDROGUI_Actor* anActor = getActor<HYDROGUI_Actor>(this);
       anActor->SetShape( myTopoShape, VTK_MIN_DEFLECTION );
       anActor->setDisplayMode( myDisplayMode );
       anActor->setIO( getIO() );
-      AddObject( anActor );
-
-      //double bounds[6];
-      //anActor->GetBounds( bounds );
-
-      anActor->Delete();
     }
   }
 }
@@ -304,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,
@@ -325,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,
@@ -333,5 +329,5 @@ void HYDROGUI_VTKPrsShape::setShape( const TopoDS_Shape& theShape,
                                      const bool          theIsUpdateViewer )
 {
   myTopoShape = theShape;
-  myDisplayMode = GEOM_Actor::eShading;
+  //myDisplayMode = GEOM_Actor::eShading;
 }