From: ouv Date: Fri, 26 Dec 2008 12:05:00 +0000 (+0000) Subject: Fix of the bug IPAL20572 - Box for creation of Clipping plane is in a lot of times... X-Git-Tag: before_mergefrom_BR_V5_IMP_P8_22Jan09~19 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=f73b74c32f7e444c717eb90ea425a3788c6f66f5;p=modules%2Fvisu.git Fix of the bug IPAL20572 - Box for creation of Clipping plane is in a lot of times more than bounding box of considered model. --- diff --git a/src/VISUGUI/VisuGUI_ClippingPlaneDlg.cxx b/src/VISUGUI/VisuGUI_ClippingPlaneDlg.cxx index c8165c18..62e2938a 100644 --- a/src/VISUGUI/VisuGUI_ClippingPlaneDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingPlaneDlg.cxx @@ -66,7 +66,7 @@ VisuGUI_ClippingPlaneDlg::VisuGUI_ClippingPlaneDlg(VisuGUI* theModule) myPlaneId(-1) { myViewWindow = VISU::GetActiveViewWindow(myModule); - ComputeVisiblePropBounds(myViewWindow->getRenderer(), myBounds); + VISU::ComputeVisiblePropBounds(myViewWindow, myBounds); setWindowTitle(tr("TITLE")); setSizeGripEnabled(true); diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 8e17c4f1..34ae14e7 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -818,11 +818,10 @@ namespace VISU } //------------------------------------------------------------ - static bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow, vtkFloatingPointType allBounds[6], - const char* theActorClassName = "VISU_Actor") + const char* theActorClassName) { vtkRenderer *aRen = theViewWindow->getRenderer(); vtkActorCollection *anActColl = aRen->GetActors(); diff --git a/src/VISUGUI/VisuGUI_Tools.h b/src/VISUGUI/VisuGUI_Tools.h index 681d45f3..1faa3d7d 100644 --- a/src/VISUGUI/VisuGUI_Tools.h +++ b/src/VISUGUI/VisuGUI_Tools.h @@ -181,6 +181,10 @@ namespace VISU void RecreateActor(const SalomeApp_Module* theModule, VISU::Prs3d_i* thePrs); + bool ComputeVisiblePropBounds(SVTK_ViewWindow* theViewWindow, + vtkFloatingPointType allBounds[6], + const char* theActorClassName = "VISU_Actor"); + /*! * \brief Advanced FitAll, sets view projection in accordance with current view contents *