Skip to content

Commit

Permalink
Fix enabling field length parameter in New Memory Layer dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
agiudiceandrea authored and nyalldawson committed Apr 6, 2023
1 parent 92dde86 commit bec4b6f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/gui/qgsnewmemorylayerdialog.cpp
Expand Up @@ -161,6 +161,7 @@ void QgsNewMemoryLayerDialog::mTypeBox_currentIndexChanged( int )
mPrecision->clear();
mPrecision->setEnabled( false );
mWidth->setValidator( new QIntValidator( 1, 255, this ) );
mWidth->setEnabled( true );
}
else if ( fieldType == QLatin1String( "integer" ) )
{
Expand All @@ -169,6 +170,7 @@ void QgsNewMemoryLayerDialog::mTypeBox_currentIndexChanged( int )
mPrecision->clear();
mPrecision->setEnabled( false );
mWidth->setValidator( new QIntValidator( 1, 10, this ) );
mWidth->setEnabled( true );
}
else if ( fieldType == QLatin1String( "double" ) )
{
Expand All @@ -178,6 +180,7 @@ void QgsNewMemoryLayerDialog::mTypeBox_currentIndexChanged( int )
mPrecision->setText( QStringLiteral( "6" ) );
mPrecision->setEnabled( true );
mWidth->setValidator( new QIntValidator( 1, 20, this ) );
mWidth->setEnabled( true );
}
else if ( fieldType == QLatin1String( "bool" ) )
{
Expand Down

0 comments on commit bec4b6f

Please sign in to comment.