SalomeApp_DoubleSpinBox::SalomeApp_DoubleSpinBox( QWidget* parent )
: QtxDoubleSpinBox( parent ),
myDefaultValue( 0.0 ),
+ myIsRangeSet( false ),
myMinimum( 0.0 ),
myMaximum( 99.99 )
{
SalomeApp_DoubleSpinBox::SalomeApp_DoubleSpinBox( double min, double max, double step, QWidget* parent )
: QtxDoubleSpinBox( min, max, step, parent ),
myDefaultValue( 0.0 ),
+ myIsRangeSet( false ),
myMinimum( min ),
myMaximum( max )
{
SalomeApp_DoubleSpinBox::SalomeApp_DoubleSpinBox( double min, double max, double step, int prec, int dec, QWidget* parent )
: QtxDoubleSpinBox( min, max, step, prec, dec, parent ),
myDefaultValue( 0.0 ),
+ myIsRangeSet( false ),
myMinimum( min ),
myMaximum( max )
{
{
QtxDoubleSpinBox::setRange( min, max );
+ myIsRangeSet = true;
myMinimum = min;
myMaximum = max;
}
*/
bool SalomeApp_DoubleSpinBox::checkRange( const QString& str ) const
{
+ if( !myIsRangeSet )
+ return true;
+
bool ok = false;
double value = str.toDouble( &ok );
return ok && value >= myMinimum && value <= myMaximum;