mirror of
https://github.com/qgis/QGIS.git
synced 2025-04-14 00:07:35 -04:00
Bump lowest possible min for numeric parameters to -DBL_MAX + 1
We need to reserve -DBL_MAX as a special value, to allow it to work correctly in QDoubleSpinBoxes (limitation of QDoubleSpinBox)
This commit is contained in:
parent
6b56565f89
commit
297e8561a0
@ -1129,7 +1129,7 @@ class QgsProcessingParameterNumber : QgsProcessingParameterDefinition
|
||||
Type type = Integer,
|
||||
const QVariant &defaultValue = QVariant(),
|
||||
bool optional = false,
|
||||
double minValue = -DBL_MAX,
|
||||
double minValue = -DBL_MAX + 1,
|
||||
double maxValue = DBL_MAX
|
||||
);
|
||||
%Docstring
|
||||
|
@ -2003,7 +2003,7 @@ QString QgsProcessingParameterNumber::toolTip() const
|
||||
{
|
||||
QString text = QgsProcessingParameterDefinition::toolTip();
|
||||
QStringList parts;
|
||||
if ( mMin > -DBL_MAX )
|
||||
if ( mMin > -DBL_MAX + 1 )
|
||||
parts << QObject::tr( "Minimum value: %1" ).arg( mMin );
|
||||
if ( mMax < DBL_MAX )
|
||||
parts << QObject::tr( "Maximum value: %1" ).arg( mMax );
|
||||
|
@ -1099,7 +1099,7 @@ class CORE_EXPORT QgsProcessingParameterNumber : public QgsProcessingParameterDe
|
||||
Type type = Integer,
|
||||
const QVariant &defaultValue = QVariant(),
|
||||
bool optional = false,
|
||||
double minValue = -DBL_MAX,
|
||||
double minValue = -DBL_MAX + 1,
|
||||
double maxValue = DBL_MAX
|
||||
);
|
||||
|
||||
@ -1159,7 +1159,7 @@ class CORE_EXPORT QgsProcessingParameterNumber : public QgsProcessingParameterDe
|
||||
|
||||
private:
|
||||
|
||||
double mMin = -DBL_MAX;
|
||||
double mMin = -DBL_MAX + 1;
|
||||
double mMax = DBL_MAX;
|
||||
Type mDataType = Integer;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user