Skip to content

Commit

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

Fix #18583 https://issues.qgis.org/issues/18583
  • Loading branch information
m-kuhn committed Jul 5, 2018
1 parent d6da802 commit 528aee0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/gui/editorwidgets/qgsrangewidgetwrapper.cpp
Original file line number Diff line number Diff line change
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 528aee0

Please sign in to comment.