Skip to content

Commit

Permalink
[FEATURE] store column width for postgres layer selection dialog
Browse files Browse the repository at this point in the history
git-svn-id: http://svn.osgeo.org/qgis/trunk@12401 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Dec 10, 2009
1 parent e4e4ad4 commit 03aa6ca
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/app/qgspgsourceselect.cpp
Expand Up @@ -86,6 +86,11 @@ QgsPgSourceSelect::QgsPgSourceSelect( QWidget *parent, Qt::WFlags fl )
mSearchColumnComboBox->setCurrentIndex( 2 );

restoreGeometry( settings.value( "/Windows/PgSourceSelect/geometry" ).toByteArray() );

for ( int i = 0; i < mTableModel.columnCount(); i++ )
{
mTablesTreeView->setColumnWidth( i, settings.value( QString( "/Windows/PgSourceSelect/columnWidths/%1" ).arg( i ), mTablesTreeView->columnWidth( i ) ).toInt() );
}
}
/** Autoconnected SLOTS **/
// Slot for adding a new connection
Expand Down Expand Up @@ -255,6 +260,11 @@ QgsPgSourceSelect::~QgsPgSourceSelect()

QSettings settings;
settings.setValue( "/Windows/PgSourceSelect/geometry", saveGeometry() );

for ( int i = 0; i < mTableModel.columnCount(); i++ )
{
settings.setValue( QString( "/Windows/PgSourceSelect/columnWidths/%1" ).arg( i ), mTablesTreeView->columnWidth( i ) );
}
}

void QgsPgSourceSelect::populateConnectionList()
Expand Down

0 comments on commit 03aa6ca

Please sign in to comment.