mirror of
https://github.com/qgis/QGIS.git
synced 2025-10-09 00:08:52 -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,
|
Type type = Integer,
|
||||||
const QVariant &defaultValue = QVariant(),
|
const QVariant &defaultValue = QVariant(),
|
||||||
bool optional = false,
|
bool optional = false,
|
||||||
double minValue = -DBL_MAX,
|
double minValue = -DBL_MAX + 1,
|
||||||
double maxValue = DBL_MAX
|
double maxValue = DBL_MAX
|
||||||
);
|
);
|
||||||
%Docstring
|
%Docstring
|
||||||
|
@ -2003,7 +2003,7 @@ QString QgsProcessingParameterNumber::toolTip() const
|
|||||||
{
|
{
|
||||||
QString text = QgsProcessingParameterDefinition::toolTip();
|
QString text = QgsProcessingParameterDefinition::toolTip();
|
||||||
QStringList parts;
|
QStringList parts;
|
||||||
if ( mMin > -DBL_MAX )
|
if ( mMin > -DBL_MAX + 1 )
|
||||||
parts << QObject::tr( "Minimum value: %1" ).arg( mMin );
|
parts << QObject::tr( "Minimum value: %1" ).arg( mMin );
|
||||||
if ( mMax < DBL_MAX )
|
if ( mMax < DBL_MAX )
|
||||||
parts << QObject::tr( "Maximum value: %1" ).arg( mMax );
|
parts << QObject::tr( "Maximum value: %1" ).arg( mMax );
|
||||||
|
@ -1099,7 +1099,7 @@ class CORE_EXPORT QgsProcessingParameterNumber : public QgsProcessingParameterDe
|
|||||||
Type type = Integer,
|
Type type = Integer,
|
||||||
const QVariant &defaultValue = QVariant(),
|
const QVariant &defaultValue = QVariant(),
|
||||||
bool optional = false,
|
bool optional = false,
|
||||||
double minValue = -DBL_MAX,
|
double minValue = -DBL_MAX + 1,
|
||||||
double maxValue = DBL_MAX
|
double maxValue = DBL_MAX
|
||||||
);
|
);
|
||||||
|
|
||||||
@ -1159,7 +1159,7 @@ class CORE_EXPORT QgsProcessingParameterNumber : public QgsProcessingParameterDe
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
||||||
double mMin = -DBL_MAX;
|
double mMin = -DBL_MAX + 1;
|
||||||
double mMax = DBL_MAX;
|
double mMax = DBL_MAX;
|
||||||
Type mDataType = Integer;
|
Type mDataType = Integer;
|
||||||
};
|
};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user