Salome HOME
Refs #289 - Spline profile is represented in OCC view as polyline profile
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_VTKPrsBathymetry.cxx
index 31817f2c4b09d4e5245763f62d778ea4b04caba1..5b7a850be4cb5d9ede0d6660454d4bd3bea06979 100644 (file)
@@ -67,6 +67,8 @@ HYDROGUI_VTKPrsBathymetry::~HYDROGUI_VTKPrsBathymetry()
 //================================================================
 void HYDROGUI_VTKPrsBathymetry::compute()
 {
+  HYDROGUI_VTKPrs::compute();
+
   if ( !getObject().IsNull() )
   {
     Handle(HYDROData_Bathymetry) aBathymetry = Handle(HYDROData_Bathymetry)::DownCast( getObject() );
@@ -141,12 +143,11 @@ void HYDROGUI_VTKPrsBathymetry::compute()
 
       myMapper->SetInputData( aVertexGrid );
       
-      SALOME_Actor* anActor = SALOME_Actor::New();
+      SALOME_Actor* anActor = getActor<SALOME_Actor>(this);
       anActor->SetMapper( myMapper.GetPointer() );
       anActor->setIO( getIO() );
       AddObject( anActor );
 
-      anActor->Delete();
       aVertexGrid->Delete();
       aZValues->Delete();
     }