From: ana Date: Fri, 19 Nov 2010 09:20:05 +0000 (+0000) Subject: Fix for the IPAL20565: Global Clipping Planes created in a study are not operate... X-Git-Tag: mergeto_V6_main_21Mar11~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d29bb87c0d17a96334177d3471bf0eee6b9cb2a7;p=modules%2Fvisu.git Fix for the IPAL20565: Global Clipping Planes created in a study are not operate in the stored and reloaded study --- diff --git a/src/VISUGUI/VisuGUI.cxx b/src/VISUGUI/VisuGUI.cxx index bb6ba823..5a863079 100644 --- a/src/VISUGUI/VisuGUI.cxx +++ b/src/VISUGUI/VisuGUI.cxx @@ -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(theStudy)),true); emit moduleActivated(); return aResult; diff --git a/src/VISU_I/VISU_ClippingPlaneMgr.cxx b/src/VISU_I/VISU_ClippingPlaneMgr.cxx index 7a169cca..50f63e7a 100644 --- a/src/VISU_I/VISU_ClippingPlaneMgr.cxx +++ b/src/VISU_I/VISU_ClippingPlaneMgr.cxx @@ -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); } } } diff --git a/src/VISU_I/VISU_ClippingPlaneMgr.hxx b/src/VISU_I/VISU_ClippingPlaneMgr.hxx index 7841a1a0..9357547b 100644 --- a/src/VISU_I/VISU_ClippingPlaneMgr.hxx +++ b/src/VISU_I/VISU_ClippingPlaneMgr.hxx @@ -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,