Salome HOME
Exlude the user input during process events by application (Bug #325).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_Poly3DOp.cxx
index 26c9e374f23feb1fecba62e11402c5021aec9681..8259381af1ee2d4767cf1fdd1a0842c11ec95a49 100644 (file)
@@ -89,9 +89,9 @@ void HYDROGUI_Poly3DOp::startOperation()
     if( !aPoly.IsNull() )
       aPolyName = aPoly->GetName();
 
-    Handle(HYDROData_Bathymetry) aBathymetry = myEditedObject->GetBathymetry();
-    if( !aBathymetry.IsNull() )
-      aBathName = aBathymetry->GetName();
+    Handle(HYDROData_IAltitudeObject) anAltitudeObj = myEditedObject->GetAltitudeObject();
+    if( !anAltitudeObj.IsNull() )
+      aBathName = anAltitudeObj->GetName();
 
     aPanel->setSelectedObjects( aPolyName, aProfileName, aBathName );
   }
@@ -145,9 +145,6 @@ bool HYDROGUI_Poly3DOp::processApply( int& theUpdateFlags,
   if( myIsEdit )
   {
     aResult = myEditedObject;
-    aResult->RemoveProfileUZ();
-    aResult->RemovePolylineXY();
-    aResult->RemoveBathymetry();
   }
   else
   {
@@ -159,6 +156,7 @@ bool HYDROGUI_Poly3DOp::processApply( int& theUpdateFlags,
 
   aResult->SetName( aResultName );
 
+  aResult->SetPolylineXY( aPolyline, false );
   if ( !aProfile.IsNull() )
   {
     Handle(HYDROData_ProfileUZ) aProfileUZ = aProfile->GetProfileUZ();
@@ -169,11 +167,9 @@ bool HYDROGUI_Poly3DOp::processApply( int& theUpdateFlags,
   }
   else
   {
-    aResult->SetBathymetry( aBath );
+    aResult->SetAltitudeObject( aBath );
   }
 
-  aResult->SetPolylineXY( aPolyline );
-
   if( !myIsEdit )
   {
     aResult->SetBorderColor( HYDROData_Polyline3D::DefaultBorderColor() );
@@ -188,7 +184,8 @@ bool HYDROGUI_Poly3DOp::processApply( int& theUpdateFlags,
     module()->setObjectVisible( aViewId, aProfile, false );
     module()->setObjectVisible( aViewId, aResult, true );
   }
+  module()->setIsToUpdate( aResult );
 
-  theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced;
+  theUpdateFlags = UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer;
   return true;
 }