Skip to content

Commit

Permalink
Tweak the way column widths are set in the identify results dialog box
Browse files Browse the repository at this point in the history
to ensure they are always wide enough for their data.


git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@5655 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
g_j_m committed Aug 2, 2006
1 parent b571290 commit 4c5da0e
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 12 deletions.
12 changes: 3 additions & 9 deletions src/gui/qgsidentifyresults.cpp
Expand Up @@ -37,7 +37,9 @@ QgsIdentifyResults::QgsIdentifyResults(const QgsAttributeAction& actions,
mActionPopup(0)
{
setupUi(this);
lstResults->setResizeMode(Q3ListView::AllColumns);
lstResults->setResizeMode(Q3ListView::LastColumn);
lstResults->setColumnWidthMode(0, Q3ListView::Maximum);
lstResults->setColumnWidthMode(1, Q3ListView::Maximum);

connect( buttonCancel, SIGNAL(clicked()),
this, SLOT(close()) );
Expand Down Expand Up @@ -233,14 +235,6 @@ 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: 0 additions & 1 deletion src/gui/qgsidentifyresults.h
Expand Up @@ -67,7 +67,6 @@ class QgsIdentifyResults: public QDialog, private Ui::QgsIdentifyResultsBase
void restorePosition();
void closeEvent(QCloseEvent *e);
void showAllAttributes();
void adjustColumnWidths();

/** Remove results */
void clear();
Expand Down
2 changes: 0 additions & 2 deletions src/gui/qgsmaptoolidentify.cpp
Expand Up @@ -312,8 +312,6 @@ void QgsMapToolIdentify::identifyVectorLayer(QgsVectorLayer* layer, const QgsPoi

QApplication::restoreOverrideCursor();

mResults->adjustColumnWidths();

mResults->show();
}
else
Expand Down

0 comments on commit 4c5da0e

Please sign in to comment.