We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents e953141 + 5609f4a commit ed45181Copy full SHA for ed45181
src/gui/editorwidgets/qgsrangewidgetwrapper.cpp
@@ -145,12 +145,12 @@ void QgsRangeWidgetWrapper::initWidget( QWidget *editor )
145
int minval = min.toInt();
146
if ( allowNull )
147
{
148
- int stepval = step.isValid() ? step.toInt() : 1;
149
- int newMinval = minval - stepval;
+ uint stepval = step.isValid() ? step.toUInt() : 1;
150
// make sure there is room for a new value (i.e. signed integer does not overflow)
151
- if ( newMinval < minval )
+ int minvalOverflow = uint( minval ) - stepval;
+ if ( minvalOverflow < minval )
152
153
- minval = newMinval;
+ minval = minvalOverflow;
154
}
155
mIntSpinBox->setValue( minval );
156
QgsSpinBox *intSpinBox( qobject_cast<QgsSpinBox *>( mIntSpinBox ) );
0 commit comments