Salome HOME
Refs #288 - the profile section selected and addition mode is activated
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_UpdateObjectOp.cxx
index ec2285e5933d30c7324cdf352c94db71b5dc3a6d..40af609bace836c22986b82a07c87746e40fe2b1 100644 (file)
 #include <HYDROData_Document.h>
 #include <HYDROData_Image.h>
 
-HYDROGUI_UpdateObjectOp::HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule )
-: HYDROGUI_Operation( theModule )
+HYDROGUI_UpdateObjectOp::HYDROGUI_UpdateObjectOp( HYDROGUI_Module* theModule,
+                                                  const bool       theIsForced )
+: HYDROGUI_Operation( theModule ),
+  myIsForced( theIsForced )
 {
   setName( tr( "UPDATE_IMAGE" ) );
 }
@@ -56,7 +58,7 @@ void HYDROGUI_UpdateObjectOp::startOperation()
 
   commitDocOperation();
 
-  module()->update( UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced );
+  module()->update( UF_Model | UF_Viewer | UF_GV_Forced | UF_OCCViewer | UF_OCC_Forced | UF_VTKViewer );
   commit();
 }
 
@@ -75,9 +77,10 @@ void HYDROGUI_UpdateObjectOp::updateObject( const Handle(HYDROData_Entity)& theO
     updateObject( anObject, theMapOfTreated );
   }
 
-  if ( !theObject->IsMustBeUpdated() )
+  if ( !myIsForced && !theObject->IsMustBeUpdated() )
     return;
 
   theObject->Update();
+  module()->setIsToUpdate( theObject );
 }