From: sbh Date: Fri, 18 Apr 2014 08:55:40 +0000 (+0400) Subject: Bug #26: set default range for spinbox to -DBL_MAX .. DBL_MAX. X-Git-Tag: V_0.2~150 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=233d13815bbe36cf42b4ac73377cc75c85dccb70;p=modules%2Fshaper.git Bug #26: set default range for spinbox to -DBL_MAX .. DBL_MAX. --- diff --git a/src/Config/plugin-PartSet.xml b/src/Config/plugin-PartSet.xml index d9795ad2c..3cc8a1182 100644 --- a/src/Config/plugin-PartSet.xml +++ b/src/Config/plugin-PartSet.xml @@ -9,12 +9,9 @@ - - - + + + diff --git a/src/XGUI/XGUI_WidgetFactory.cpp b/src/XGUI/XGUI_WidgetFactory.cpp index bd08442a4..4c5223324 100644 --- a/src/XGUI/XGUI_WidgetFactory.cpp +++ b/src/XGUI/XGUI_WidgetFactory.cpp @@ -26,6 +26,9 @@ #include #endif +#include +#include + XGUI_WidgetFactory::XGUI_WidgetFactory(ModuleBase_Operation* theOperation) : myOperation(theOperation) { @@ -132,11 +135,15 @@ QWidget* XGUI_WidgetFactory::doubleSpinBoxControl() double aMinVal = qs(aProp).toDouble(&isOk); if (isOk) { aBox->setMinimum(aMinVal); + } else { + aBox->setMinimum(-DBL_MAX); } aProp = myWidgetApi->getProperty(DOUBLE_WDG_MAX); double aMaxVal = qs(aProp).toDouble(&isOk); if (isOk) { aBox->setMaximum(aMaxVal); + } else { + aBox->setMaximum(DBL_MAX); } aProp = myWidgetApi->getProperty(DOUBLE_WDG_STEP); double aStepVal = qs(aProp).toDouble(&isOk);