From 3cc8f2aecedcf7cadb1aebac90bee17c00ffbd6f Mon Sep 17 00:00:00 2001 From: dmv Date: Tue, 28 Oct 2008 08:30:34 +0000 Subject: [PATCH] GEOM: It should be forbidden creation of primitives with zero dimensions. --- src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx | 6 +++--- src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx | 4 ++-- src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx index 4ff84badb..cd2b32852 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_BoxDlg.cxx @@ -123,9 +123,9 @@ void PrimitiveGUI_BoxDlg::Init() double step = resMgr->doubleValue( "Geometry", "SettingsGeomStep", 100); /* min, max, step and decimals for spin boxes */ - GroupDimensions->SpinBox_DX->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); - GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); - GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); + GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY); + GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY); + GroupDimensions->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY); double initValue = 200.0; GroupDimensions->SpinBox_DX->SetValue(initValue); diff --git a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx index e2ad901fe..9b69d4ff3 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_ConeDlg.cxx @@ -128,10 +128,10 @@ void PrimitiveGUI_ConeDlg::Init() /* min, max, step and decimals for spin boxes & initial values */ GroupPoints->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY); GroupPoints->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY); - GroupPoints->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); + GroupPoints->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY); GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY); GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.000, COORD_MAX, step, DBL_DIGITS_DISPLAY); - GroupDimensions->SpinBox_DZ->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); + GroupDimensions->SpinBox_DZ->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY); double aRadius1(100.0), aRadius2(0.0), aHeight(300.0); GroupPoints->SpinBox_DX->SetValue(aRadius1); diff --git a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx index 82de95d33..8d25d29d2 100644 --- a/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx +++ b/src/PrimitiveGUI/PrimitiveGUI_CylinderDlg.cxx @@ -127,11 +127,11 @@ void PrimitiveGUI_CylinderDlg::Init() /* First constructor : radius */ GroupPoints->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY); /* First constructor : algebric height */ - GroupPoints->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); + GroupPoints->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY); /* Second constructor : radius */ GroupDimensions->SpinBox_DX->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY); /* Second constructor : algebric height */ - GroupDimensions->SpinBox_DY->RangeStepAndValidator(COORD_MIN, COORD_MAX, step, DBL_DIGITS_DISPLAY); + GroupDimensions->SpinBox_DY->RangeStepAndValidator(0.001, COORD_MAX, step, DBL_DIGITS_DISPLAY); GroupPoints->SpinBox_DX->SetValue(100.0); GroupPoints->SpinBox_DY->SetValue(300.0);