[QGIS Commit] r11990 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat Nov 7 18:27:20 EST 2009


Author: jef
Date: 2009-11-07 18:27:19 -0500 (Sat, 07 Nov 2009)
New Revision: 11990

Modified:
   trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp
Log:
add numeric validator field width and precision in new vector dialog

Modified: trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp	2009-11-07 22:57:35 UTC (rev 11989)
+++ trunk/qgis/src/app/qgsnewvectorlayerdialog.cpp	2009-11-07 23:27:19 UTC (rev 11990)
@@ -32,6 +32,9 @@
   mTypeBox->addItem( tr( "Whole number" ), "Integer" );
   mTypeBox->addItem( tr( "Decimal number" ), "Real" );
 
+  mWidth->setValidator( new QIntValidator( 1, 255, this ) );
+  mPrecision->setValidator( new QIntValidator( 0, 20, this ) );
+
   mPointRadioButton->setChecked( true );
   mFileFormatComboBox->addItem( tr( "ESRI Shapefile" ), "ESRI Shapefile" );
   /* Disabled until provider properly supports editing the created file formats */



More information about the QGIS-commit mailing list