From bef2fdce0a2f3e8521cd3ff9b4d5a3992e38eed4 Mon Sep 17 00:00:00 2001 From: enk Date: Mon, 22 Jan 2007 11:55:23 +0000 Subject: [PATCH] Fix for Bug IPAL14552: Application hangs up after trying to set negative value of the planes for the CutPlanes presentation. --- src/PIPELINE/VISU_CutPlanesPL.cxx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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(); -- 2.39.2