Skip to content

Commit

Permalink
Adjust column widths in the identify results dialog to better fit the…
Browse files Browse the repository at this point in the history
… contents

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5477 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed May 19, 2006
1 parent 873acd3 commit c4a0bc8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 4 deletions.
11 changes: 8 additions & 3 deletions src/gui/qgsidentifyresults.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,6 @@ void QgsIdentifyResults::popupContextMenu(Q3ListViewItem* item,
QLabel* popupLabel = new QLabel( mActionPopup );
popupLabel->setText( tr("<center>Run action</center>") );
// TODO: Qt4 uses "QAction"s - need to refactor.
#if QT_VERSION < 0x040000
mActionPopup->insertItem(popupLabel);
#endif
mActionPopup->insertSeparator();

QgsAttributeAction::aIter iter = mActions.begin();
Expand Down Expand Up @@ -205,6 +202,14 @@ void QgsIdentifyResults::showAllAttributes() {
lstResults->setOpen(*qlvii, true);
}

/** adjust all of the colums to show their contents */
void QgsIdentifyResults::adjustColumnWidths()
{
lstResults->adjustColumn(0);
lstResults->adjustColumn(1);
}


void QgsIdentifyResults::clear()
{
lstResults->clear();
Expand Down
1 change: 1 addition & 0 deletions src/gui/qgsidentifyresults.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
void restorePosition();
void closeEvent(QCloseEvent *e);
void showAllAttributes();
void adjustColumnWidths();

/** Remove results */
void clear();
Expand Down
4 changes: 3 additions & 1 deletion src/gui/qgsmaptoolidentify.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,9 @@ void QgsMapToolIdentify::identifyVectorLayer(QgsVectorLayer* layer, const QgsPoi
}

QApplication::restoreOverrideCursor();


mResults->adjustColumnWidths();

mResults->show();
}
else
Expand Down

0 comments on commit c4a0bc8

Please sign in to comment.