From d29bb87c0d17a96334177d3471bf0eee6b9cb2a7 Mon Sep 17 00:00:00 2001 From: ana Date: Fri, 19 Nov 2010 09:20:05 +0000 Subject: [PATCH] Fix for the IPAL20565: Global Clipping Planes created in a study are not operate in the stored and reloaded study --- src/VISUGUI/VisuGUI.cxx | 2 +- src/VISU_I/VISU_ClippingPlaneMgr.cxx | 7 ++++--- src/VISU_I/VISU_ClippingPlaneMgr.hxx | 2 +- 3 files changed, 6 insertions(+), 5 deletions(-) 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, -- 2.39.2