Skip to content

Commit 528aee0

Browse files
committed
Handle invalid step size
in range widgets in combination with NULL values. Fix #18583 https://issues.qgis.org/issues/18583
1 parent d6da802 commit 528aee0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/gui/editorwidgets/qgsrangewidgetwrapper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ void QgsRangeWidgetWrapper::initWidget( QWidget *editor )
138138
int minval = min.toInt();
139139
if ( allowNull )
140140
{
141-
int stepval = step.toInt();
141+
int stepval = step.isValid() ? step.toInt() : 1;
142142
minval -= stepval;
143143
mIntSpinBox->setValue( minval );
144144
mIntSpinBox->setSpecialValueText( QgsApplication::nullRepresentation() );

0 commit comments

Comments
 (0)