Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Handle invalid step size
in range widgets in combination with NULL values.

Fix #18583 https://issues.qgis.org/issues/18583
  • Loading branch information
m-kuhn committed Jul 3, 2018
1 parent 7e7faad commit f3682be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsrangewidgetwrapper.cpp
Expand Up @@ -138,7 +138,7 @@ void QgsRangeWidgetWrapper::initWidget( QWidget *editor )
int minval = min.toInt();
if ( allowNull )
{
int stepval = step.toInt();
int stepval = step.isValid() ? step.toInt() : 1;
minval -= stepval;
mIntSpinBox->setValue( minval );
mIntSpinBox->setSpecialValueText( QgsApplication::nullRepresentation() );
Expand Down

0 comments on commit f3682be

Please sign in to comment.