Skip to content

Commit

Permalink
default precision for new double field in the shapefile should be
Browse files Browse the repository at this point in the history
greater than 0 (refs #16581)
  • Loading branch information
alexbruy authored and nyalldawson committed May 18, 2020
1 parent def981c commit 5948c3f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsnewvectorlayerdialog.cpp
Expand Up @@ -167,6 +167,9 @@ void QgsNewVectorLayerDialog::mTypeBox_currentIndexChanged( int index )
case 2: // Decimal number
if ( mWidth->text().toInt() < 1 || mWidth->text().toInt() > 20 )
mWidth->setText( QStringLiteral( "20" ) );
if ( mPrecision->text().toInt() < 1 || mPrecision->text().toInt() > 15 )
mPrecision->setText( QStringLiteral( "6" ) )

mPrecision->setEnabled( true );
mWidth->setValidator( new QIntValidator( 1, 20, this ) );
break;
Expand Down

0 comments on commit 5948c3f

Please sign in to comment.