]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix for the IPAL20565: Global Clipping Planes created in a study are not operate...
authorana <ana@opencascade.com>
Fri, 19 Nov 2010 09:20:05 +0000 (09:20 +0000)
committerana <ana@opencascade.com>
Fri, 19 Nov 2010 09:20:05 +0000 (09:20 +0000)
src/VISUGUI/VisuGUI.cxx
src/VISU_I/VISU_ClippingPlaneMgr.cxx
src/VISU_I/VISU_ClippingPlaneMgr.hxx

index bb6ba8236c930952d1280727718085c61d4a72e8..5a8630799704ff5527d7f5374b5f77d422f98b95 100644 (file)
@@ -3666,7 +3666,7 @@ VisuGUI
   action(VISU_RENAME     )->setEnabled(true); // Rename: Key_F2
 
   ((VisuGUI_ClippingPanel*) myPanels[ClippingPlanesPanelId])->init();
-
+  GetVisuGen( this )->GetClippingPlaneMgr().SetStudy(GetCStudy(dynamic_cast<SalomeApp_Study*>(theStudy)),true);
   emit moduleActivated();
 
   return aResult;
index 7a169cca7d3934cfc859b04733a21276374c6ff7..50f63e7a6a0c54b44daf236b93f54ccd733fd4b9 100644 (file)
@@ -49,9 +49,9 @@ VISU_ClippingPlaneMgr::~VISU_ClippingPlaneMgr()
 }
 
 //*************************************************************
-void VISU_ClippingPlaneMgr::SetStudy(_PTR(Study) theStudy)
+void VISU_ClippingPlaneMgr::SetStudy(_PTR(Study) theStudy, bool reinitStudy)
 {
-  if (myStudy == theStudy) return;
+  if (myStudy == theStudy && !reinitStudy) return;
   myStudy = theStudy;
   myPlanes->RemoveAllItems();
   if (!myStudy) return;
@@ -79,7 +79,8 @@ void VISU_ClippingPlaneMgr::SetStudy(_PTR(Study) theStudy)
         aPlane->setAuto(false);
 
       applyPlaneToAll(aPlane);
-      myPlanes->AddItem(aPlane);
+
+         myPlanes->AddItem(aPlane);
     }
   }
 }
index 7841a1a094df246120073c9b5791b4bce9e713e3..9357547bf86503f246a69e7bb6c624bf83a7d705 100644 (file)
@@ -76,7 +76,7 @@ public:
   VISU_ClippingPlaneMgr();
   ~VISU_ClippingPlaneMgr();
 
-  void SetStudy(_PTR(Study) theStudy);
+  void SetStudy(_PTR(Study) theStudy, bool reinitStudy = false);
 
 
   long CreateClippingPlane(double X,double  Y, double Z,