From: enk Date: Mon, 22 Jan 2007 11:55:23 +0000 (+0000) Subject: Fix for Bug IPAL14552: X-Git-Tag: V3_2_5~9 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bef2fdce0a2f3e8521cd3ff9b4d5a3992e38eed4;p=modules%2Fvisu.git Fix for Bug IPAL14552: Application hangs up after trying to set negative value of the planes for the CutPlanes presentation. --- diff --git a/src/PIPELINE/VISU_CutPlanesPL.cxx b/src/PIPELINE/VISU_CutPlanesPL.cxx index 91a2f649..b858181d 100644 --- a/src/PIPELINE/VISU_CutPlanesPL.cxx +++ b/src/PIPELINE/VISU_CutPlanesPL.cxx @@ -36,6 +36,8 @@ using namespace std; static vtkFloatingPointType EPS = 1.0E-3; +static int MIN_NB_PLANES = 1; +static int MAX_NB_PLANES = 100; vtkStandardNewMacro(VISU_CutPlanesPL); @@ -261,7 +263,7 @@ void VISU_CutPlanesPL ::SetNbParts(int theNb) { - myNbParts = theNb; + myNbParts = (theNbMAX_NB_PLANES?MAX_NB_PLANES:theNb)); myPartPosition.resize(myNbParts); myPartCondition.resize(myNbParts,1); Modified();