Salome HOME
Dump Image data to python script (Feature #13).
[modules/hydro.git] / src / HYDROGUI / HYDROGUI_ShowHideOp.cxx
index 305af96e234f9eebc50c7951f09e45a2df0bacf5..a2d46be4c950365e0c47cd440f7620137d097954 100644 (file)
@@ -55,6 +55,8 @@ void HYDROGUI_ShowHideOp::startOperation()
 {
   HYDROGUI_Operation::startOperation();
 
+  size_t aViewId = HYDROGUI_Tool::GetActiveGraphicsViewId( module() );
+
   // for all objects
   if( myId == ShowOnlyId || myId == ShowAllId || myId == HideAllId )
   {
@@ -64,7 +66,7 @@ void HYDROGUI_ShowHideOp::startOperation()
     {
       Handle(HYDROData_Object) anObject = anIterator.Current();
       if( !anObject.IsNull() )
-        anObject->SetVisibility( aVisibility );
+        module()->setObjectVisible( aViewId, anObject, aVisibility );
     }
   }
 
@@ -78,7 +80,7 @@ void HYDROGUI_ShowHideOp::startOperation()
     {
       Handle(HYDROData_Object) anObject = aSeq.Value( anIndex );
       if( !anObject.IsNull() )
-        anObject->SetVisibility( aVisibility ? true : false );
+        module()->setObjectVisible( aViewId, anObject, aVisibility );
     }
   }