Salome HOME
Dump Image data to python script (Feature #13).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ShowHideOp.cxx
index 8d91cde4c7a2d83114bc3f7be737fb569bce298d..a2d46be4c950365e0c47cd440f7620137d097954 100644 (file)
@@ -55,8 +55,6 @@ void HYDROGUI_ShowHideOp::startOperation()
 {
   HYDROGUI_Operation::startOperation();
 
-  startDocOperation();
-
   size_t aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
 
   // for all objects
@@ -68,7 +66,7 @@ void HYDROGUI_ShowHideOp::startOperation()
     {
       Handle(HYDROData_Object) anObject = anIterator.Current();
       if( !anObject.IsNull() )
-        anObject->SetVisible( aViewId, aVisibility );
+        module()->setObjectVisible( aViewId, anObject, aVisibility );
     }
   }
 
@@ -82,12 +80,10 @@ void HYDROGUI_ShowHideOp::startOperation()
     {
       Handle(HYDROData_Object) anObject = aSeq.Value( anIndex );
       if( !anObject.IsNull() )
-        anObject->SetVisible( aViewId, aVisibility );
+        module()->setObjectVisible( aViewId, anObject, aVisibility );
     }
   }
 
-  commitDocOperation();
-
   module()->update( UF_Viewer );
   commit();
 }