Skip to content

Commit

Permalink
fix #5203
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Mar 22, 2012
1 parent 55290d0 commit 587b338
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/gui/qgsfieldvalidator.cpp
Expand Up @@ -56,6 +56,11 @@ QgsFieldValidator::QgsFieldValidator( QObject *parent, const QgsField &field )
QString re = QString( "-?\\d{0,%1}(\\.\\d{0,%2})?" ).arg( mField.length() - mField.precision() ).arg( mField.precision() );
mValidator = new QRegExpValidator( QRegExp( re ), parent );
}
else if ( mField.length() > 0 && mField.precision() == 0 )
{
QString re = QString( "-?\\d{0,%1}" ).arg( mField.length() );
mValidator = new QRegExpValidator( QRegExp( re ), parent );
}
else if ( mField.precision() > 0 )
{
QString re = QString( "-?\\d*(\\.\\d{0,%1})?" ).arg( mField.precision() );
Expand Down

0 comments on commit 587b338

Please sign in to comment.