Skip to content

Commit 1e9d999

Browse files
author
jef
committed
select current value when lineedit gets focus in attribute dialog (fixes #2742)
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13546 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e4a2eff commit 1e9d999

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/app/qgsattributedialog.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
#include <QUiLoader>
4141
#include <QDialog>
4242
#include <QVBoxLayout>
43+
#include <QLineEdit>
4344

4445
QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature )
4546
: mDialog( 0 )
@@ -352,6 +353,10 @@ bool QgsAttributeDialog::eventFilter( QObject *obj, QEvent *e )
352353
break;
353354
}
354355
}
356+
else if ( e->type() == QEvent::FocusIn && qobject_cast<QLineEdit *>( obj ) )
357+
{
358+
qobject_cast<QLineEdit *>( obj )->selectAll();
359+
}
355360

356361
return false;
357362
}

0 commit comments

Comments
 (0)