mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-03 00:02:25 -05:00
add control if lowerBound > upperBound
This commit is contained in:
parent
e6c7728b1a
commit
186936f2ad
@ -113,6 +113,9 @@ bool QgsRandomRasterAlgorithm::prepareAlgorithm( const QVariantMap ¶meters,
|
||||
mRandomUpperBound = parameterAsDouble( parameters, QStringLiteral( "UPPER_BOUND" ), context );
|
||||
mRandomLowerBound = parameterAsDouble( parameters, QStringLiteral( "LOWER_BOUND" ), context );
|
||||
|
||||
if ( mRandomLowerBound > mRandomUpperBound )
|
||||
throw QgsProcessingException( QObject::tr( "The chosen lower bound for random number range is greater than the upper bound. The lower bound value must be smaller than the upper bound value." ) );
|
||||
|
||||
mRasterDataType = Qgis::Float32; //standard output type
|
||||
switch ( mTypeId )
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user