Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
** Changed QgsIdentifyResults and QgsVectorLayer to show all attributes
   automatically (expand the feature node) if only one feature is identified


git-svn-id: http://svn.osgeo.org/qgis/trunk@2249 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
larsl committed Nov 13, 2004
1 parent f0ebd39 commit f9efbc5
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 1 deletion.
4 changes: 4 additions & 0 deletions ChangeLog
Expand Up @@ -3,6 +3,10 @@ QGIS Change Log
------------------------------------------------------------------------------
Version 0.6 'Simon' .... development version

2004-11-13 [larsl] 0.5.0devel23
** Changed QgsIdentifyResults and QgsVectorLayer to show all attributes
automatically (expand the feature node) if only one feature is identified

2004-11-11 [gsherman] 0.5.0devel22
** Added ifdef's for WIN32 around dynamic_casts in the vector renderer
dialogs. Even though rtti is enabled, use of dynamic casts causes seg
Expand Down
2 changes: 1 addition & 1 deletion configure.in
Expand Up @@ -26,7 +26,7 @@ dnl ---------------------------------------------------------------------------
MAJOR_VERSION=0
MINOR_VERSION=5
MICRO_VERSION=0
EXTRA_VERSION=22
EXTRA_VERSION=23
if test $EXTRA_VERSION -eq 0; then
VERSION=${MAJOR_VERSION}.${MINOR_VERSION}.${MICRO_VERSION}
else
Expand Down
8 changes: 8 additions & 0 deletions src/qgsidentifyresults.cpp
Expand Up @@ -158,3 +158,11 @@ void QgsIdentifyResults::popupItemSelected(int id)
{
mActions.doAction(id, mValues, mClickedOnValue);
}

/** Expand all the identified features (show their attributes). */
void QgsIdentifyResults::showAllAttributes() {
QListViewItemIterator qlvii(lstResults);
for ( ; *qlvii; ++qlvii)
lstResults->setOpen(*qlvii, true);
}

1 change: 1 addition & 0 deletions src/qgsidentifyresults.h
Expand Up @@ -54,6 +54,7 @@ class QgsIdentifyResults:public QgsIdentifyResultsBase
void close();
void closeEvent(QCloseEvent *e);
void popupContextMenu(QListViewItem*, const QPoint&, int);
void showAllAttributes();
//void accept();
//void reject();

Expand Down
2 changes: 2 additions & 0 deletions src/qgsvectorlayer.cpp
Expand Up @@ -663,6 +663,8 @@ int QgsVectorLayer::endian()
if (ir)
{
ir->setTitle(name());
if (featureCount == 1)
ir->showAllAttributes();
// restore the identify window position and show it
ir->restorePosition();
}
Expand Down

0 comments on commit f9efbc5

Please sign in to comment.