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

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sat May 22 11:41:42 EDT 2010


Author: jef
Date: 2010-05-22 11:41:42 -0400 (Sat, 22 May 2010)
New Revision: 13546

Modified:
   trunk/qgis/src/app/qgsattributedialog.cpp
Log:
select current value when lineedit gets focus in attribute dialog (fixes #2742)

Modified: trunk/qgis/src/app/qgsattributedialog.cpp
===================================================================
--- trunk/qgis/src/app/qgsattributedialog.cpp	2010-05-22 09:58:23 UTC (rev 13545)
+++ trunk/qgis/src/app/qgsattributedialog.cpp	2010-05-22 15:41:42 UTC (rev 13546)
@@ -40,6 +40,7 @@
 #include <QUiLoader>
 #include <QDialog>
 #include <QVBoxLayout>
+#include <QLineEdit>
 
 QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature )
     : mDialog( 0 )
@@ -352,6 +353,10 @@
         break;
     }
   }
+  else if ( e->type() == QEvent::FocusIn && qobject_cast<QLineEdit *>( obj ) )
+  {
+    qobject_cast<QLineEdit *>( obj )->selectAll();
+  }
 
   return false;
 }



More information about the QGIS-commit mailing list