Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[processing] Log an error when a numeric parameter has min value >= m…
…ax value

Refs #19076
  • Loading branch information
nyalldawson committed May 31, 2018
1 parent 32792d3 commit 1c68445
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/core/processing/qgsprocessingparameters.cpp
Expand Up @@ -2038,7 +2038,10 @@ QgsProcessingParameterNumber::QgsProcessingParameterNumber( const QString &name,
, mMax( maxValue )
, mDataType( type )
{

if ( mMin >= mMax )
{
QgsMessageLog::logMessage( QObject::tr( "Invalid number parameter \"%1\": min value %2 is >= max value %3!" ).arg( name ).arg( mMin ).arg( mMax ), QObject::tr( "Processing" ) );
}
}

QgsProcessingParameterDefinition *QgsProcessingParameterNumber::clone() const
Expand Down

0 comments on commit 1c68445

Please sign in to comment.