Skip to content

Commit c4a0bc8

Browse files

File tree

3 files changed

+12
-4
lines changed

3 files changed

+12
-4
lines changed
 

‎src/gui/qgsidentifyresults.cpp

Lines changed: 8 additions & 3 deletions
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

Lines changed: 1 addition & 0 deletions
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

Lines changed: 3 additions & 1 deletion
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)
Please sign in to comment.