Skip to content

Commit

Permalink
select current value when lineedit gets focus in attribute dialog (fixes
Browse files Browse the repository at this point in the history
 #2742)

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13546 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed May 22, 2010
1 parent e4a2eff commit 1e9d999
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/app/qgsattributedialog.cpp
Expand Up @@ -40,6 +40,7 @@
#include <QUiLoader>
#include <QDialog>
#include <QVBoxLayout>
#include <QLineEdit>

QgsAttributeDialog::QgsAttributeDialog( QgsVectorLayer *vl, QgsFeature *thepFeature )
: mDialog( 0 )
Expand Down Expand Up @@ -352,6 +353,10 @@ bool QgsAttributeDialog::eventFilter( QObject *obj, QEvent *e )
break;
}
}
else if ( e->type() == QEvent::FocusIn && qobject_cast<QLineEdit *>( obj ) )
{
qobject_cast<QLineEdit *>( obj )->selectAll();
}

return false;
}

0 comments on commit 1e9d999

Please sign in to comment.