Skip to content
Permalink
Browse files
Merge pull request #7371 from m-kuhn/backport_7354
Handle invalid step size
  • Loading branch information
m-kuhn committed Jul 6, 2018
2 parents ca2abb5 + 528aee0 commit 7db1535f2578fa2150b1b5109ec98b9a5e0f3893
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
@@ -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() );
@@ -479,7 +479,7 @@ def testTransactionConstrains(self):

# check new values
self.assertTrue(vl.getFeatures('id=1').nextFeature(f))
self.assertEqual(f.attributes(), [1, 1, NULL])
self.assertEqual(f.attributes(), [1, 1, 0])

def testTransactionTuple(self):
# create a vector layer based on postgres

0 comments on commit 7db1535

Please sign in to comment.