Skip to content
Permalink
Browse files
fix #5203
  • Loading branch information
jef-n committed Mar 22, 2012
1 parent 55290d0 commit 587b33821dde8343d188d5683d5b9e153528c963
Showing with 5 additions and 0 deletions.
  1. +5 −0 src/gui/qgsfieldvalidator.cpp
@@ -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() );

0 comments on commit 587b338

Please sign in to comment.