]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Additional fir for the issue "21254: EDF 1861 VISU: Eye symbol and VISU presentations".
authorrnv <rnv@opencascade.com>
Tue, 10 May 2011 08:07:35 +0000 (08:07 +0000)
committerrnv <rnv@opencascade.com>
Tue, 10 May 2011 08:07:35 +0000 (08:07 +0000)
src/VISU_I/VISU_Tools.cxx
src/VISU_I/VISU_Tools.h
src/VISU_I/VISU_ViewManager_i.cc

index 06dfe710b08c08fbbfbf5ed43ef0c6f8a2a29838..dca6f1074855bd58dc3928d5a10f294fdb5045c6 100644 (file)
@@ -334,7 +334,7 @@ namespace VISU
   }
 
   //------------------------------------------------------------
-  void SetVisibilityState(VISU_ActorBase *theActor, Qtx::VisibilityState state) {
+  void SetVisibilityState(SALOME_Actor *theActor, Qtx::VisibilityState state) {
     if(!theActor || !theActor->hasIO() || !theActor->getIO()->hasEntry())
       return;
     SetVisibilityState(theActor->getIO()->getEntry(), state);
index b0740bd933e1ceef5f8a2a46f7e0d2d26a4a2eaf..cb2f5d44c2df9ef0baa943ad4eef6320d83a3110 100644 (file)
@@ -36,6 +36,7 @@ class Plot2d_ViewFrame;
 class SalomeApp_Study;
 class SalomeApp_Application;
 class VISU_ActorBase;
+class SALOME_Actor;
 
 namespace VISU 
 {
@@ -73,7 +74,7 @@ namespace VISU
                                                                  _PTR(SObject) theTableSO );
 
   VISU_I_EXPORT void                                 SetVisibilityState(std::string entry, Qtx::VisibilityState state);
-  VISU_I_EXPORT void                                 SetVisibilityState(VISU_ActorBase *theActor, Qtx::VisibilityState state);
+  VISU_I_EXPORT void                                 SetVisibilityState(SALOME_Actor *theActor, Qtx::VisibilityState state);
 
   VISU_I_EXPORT void                                 CurveVisibilityChanged(VISU::Curve_i* theCurve, 
                                                                            int theDisplaying,
index 932dea774e9aaa360a7d1d7bba775f6d4eb236a1..f898f877410a739314345af2c891c5f95949cdc9 100644 (file)
@@ -297,8 +297,8 @@ namespace VISU {
     vtkActorCollection* anActColl = aCopy.GetActors();
     vtkActor *anActor;
     VISU_Actor *anVISUActor = NULL, *aResActor = NULL;
-    for(anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL;){
-      if(anActor->IsA("VISU_Actor")){
+    for(anActColl->InitTraversal(); (anActor = anActColl->GetNextActor()) != NULL;) {
+      if( anActor->IsA("VISU_Actor") ) {
         anVISUActor = VISU_Actor::SafeDownCast(anActor);
         if (thePrs == anVISUActor->GetPrs3d()) {
           aResActor = anVISUActor;
@@ -317,11 +317,20 @@ namespace VISU {
          }
           else if ( theDisplaing == eDisplayAll ) {
             anVISUActor->VisibilityOn();
-           VISU::SetVisibilityState(anVISUActor, Qtx::HiddenState);
+           VISU::SetVisibilityState(anVISUActor, Qtx::ShownState);
          }
         }
+      } else if ( anActor->IsA("SALOME_Actor") && (theDisplaing == eEraseAll || theDisplaing == eDisplayOnly) ) {
+       // rnv : fix for the 21254: EDF 1861 VISU: Eye symbol and VISU presentations.
+       //       Take into account presentations created in other modules.
+       SALOME_Actor* aSActor = SALOME_Actor::SafeDownCast(anActor);
+       if( aSActor ) {
+         aSActor->VisibilityOff();
+         VISU::SetVisibilityState(aSActor, Qtx::HiddenState);
+       }
       }
     }
+    
     if (aResActor) {
       RepaintView(theViewWindow);
       return aResActor;