Skip to content

Commit 27ca925

Browse files
author
g_j_m
committedAug 2, 2006
Tweak the way column widths are set in the identify results dialog box
to ensure they are always wide enough for their data. git-svn-id: http://svn.osgeo.org/qgis/trunk@5655 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent 0c3951b commit 27ca925

File tree

3 files changed

+3
-12
lines changed

3 files changed

+3
-12
lines changed
 

‎src/gui/qgsidentifyresults.cpp

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ QgsIdentifyResults::QgsIdentifyResults(const QgsAttributeAction& actions,
3737
mActionPopup(0)
3838
{
3939
setupUi(this);
40-
lstResults->setResizeMode(Q3ListView::AllColumns);
40+
lstResults->setResizeMode(Q3ListView::LastColumn);
41+
lstResults->setColumnWidthMode(0, Q3ListView::Maximum);
42+
lstResults->setColumnWidthMode(1, Q3ListView::Maximum);
4143

4244
connect( buttonCancel, SIGNAL(clicked()),
4345
this, SLOT(close()) );
@@ -233,14 +235,6 @@ void QgsIdentifyResults::showAllAttributes() {
233235
lstResults->setOpen(*qlvii, true);
234236
}
235237

236-
/** adjust all of the colums to show their contents */
237-
void QgsIdentifyResults::adjustColumnWidths()
238-
{
239-
lstResults->adjustColumn(0);
240-
lstResults->adjustColumn(1);
241-
}
242-
243-
244238
void QgsIdentifyResults::clear()
245239
{
246240
lstResults->clear();

‎src/gui/qgsidentifyresults.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,6 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
6767
void restorePosition();
6868
void closeEvent(QCloseEvent *e);
6969
void showAllAttributes();
70-
void adjustColumnWidths();
7170

7271
/** Remove results */
7372
void clear();

‎src/gui/qgsmaptoolidentify.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -312,8 +312,6 @@ void QgsMapToolIdentify::identifyVectorLayer(QgsVectorLayer* layer, const QgsPoi
312312

313313
QApplication::restoreOverrideCursor();
314314

315-
mResults->adjustColumnWidths();
316-
317315
mResults->show();
318316
}
319317
else

0 commit comments

Comments
 (0)
Please sign in to comment.