Skip to content
Permalink
Browse files

default precision for new double field in the shapefile should be

greater than 0 (refs #16581)
  • Loading branch information
alexbruy authored and nyalldawson committed May 18, 2020
1 parent def981c commit 5948c3f499b3fdca2469271882243a6e1785491a
Showing with 3 additions and 0 deletions.
  1. +3 −0 src/gui/qgsnewvectorlayerdialog.cpp
@@ -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;

0 comments on commit 5948c3f

Please sign in to comment.
You can’t perform that action at this time.