Skip to content

Commit fa510af

Browse files
author
g_j_m
committed
Adjust column widths in the identify results dialog to better fit the contents
git-svn-id: http://svn.osgeo.org/qgis/trunk@5477 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 862a654 commit fa510af

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed

src/gui/qgsidentifyresults.cpp

+8-3
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ void QgsIdentifyResults::popupContextMenu(Q3ListViewItem* item,
8484
QLabel* popupLabel = new QLabel( mActionPopup );
8585
popupLabel->setText( tr("<center>Run action</center>") );
8686
// TODO: Qt4 uses "QAction"s - need to refactor.
87-
#if QT_VERSION < 0x040000
88-
mActionPopup->insertItem(popupLabel);
89-
#endif
9087
mActionPopup->insertSeparator();
9188

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

205+
/** adjust all of the colums to show their contents */
206+
void QgsIdentifyResults::adjustColumnWidths()
207+
{
208+
lstResults->adjustColumn(0);
209+
lstResults->adjustColumn(1);
210+
}
211+
212+
208213
void QgsIdentifyResults::clear()
209214
{
210215
lstResults->clear();

src/gui/qgsidentifyresults.h

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
6060
void restorePosition();
6161
void closeEvent(QCloseEvent *e);
6262
void showAllAttributes();
63+
void adjustColumnWidths();
6364

6465
/** Remove results */
6566
void clear();

src/gui/qgsmaptoolidentify.cpp

+3-1
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,9 @@ void QgsMapToolIdentify::identifyVectorLayer(QgsVectorLayer* layer, const QgsPoi
305305
}
306306

307307
QApplication::restoreOverrideCursor();
308-
308+
309+
mResults->adjustColumnWidths();
310+
309311
mResults->show();
310312
}
311313
else

0 commit comments

Comments
 (0)