Salome HOME
Fix for the bug #45: check and warning when the same image is used in 2 arguments.
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ProfileOp.cxx
index db4cd7baf4601d6a4ae1d38dc83809cfefb3949a..a9a9cf2cdeb0a2280f2744e85ed1fe1c3ad9af33 100644 (file)
@@ -200,8 +200,7 @@ bool HYDROGUI_ProfileOp::processApply( int& theUpdateFlags,
   }
   aProfileObj->SetParametricPoints( aProfileParamPoints );
 
-  if( !myIsEdit )
-    module()->setObjectVisible( HYDROGUI_Tool::GetActiveOCCViewId( module() ), aProfileObj, true );
+  aProfileObj->Update();
 
   theUpdateFlags = UF_Model;
   return true;
@@ -217,7 +216,7 @@ void HYDROGUI_ProfileOp::displayPreview()
     {
       CurveCreator_Displayer* aDisplayer = new CurveCreator_Displayer( aCtx );
       myProfile->setDisplayer( aDisplayer );
-      aDisplayer->display( myProfile->constructWire(), true );
+      aDisplayer->display( myProfile->getAISObject( true ), true );
     }
   }
 }
@@ -231,7 +230,7 @@ void HYDROGUI_ProfileOp::erasePreview()
     Handle(AIS_InteractiveContext) aCtx = aPanel->getAISContext();
     if( !aCtx.IsNull() )
     {
-      aDisplayer->erase( true );
+      aDisplayer->eraseAll( true );
     }
   }
 }