Skip to content

Commit 03aa6ca

Browse files
author
jef
committed
[FEATURE] store column width for postgres layer selection dialog
git-svn-id: http://svn.osgeo.org/qgis/trunk@12401 c8812cc2-4d05-0410-92ff-de0c093fc19c
1 parent e4e4ad4 commit 03aa6ca

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/app/qgspgsourceselect.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ QgsPgSourceSelect::QgsPgSourceSelect( QWidget *parent, Qt::WFlags fl )
8686
mSearchColumnComboBox->setCurrentIndex( 2 );
8787

8888
restoreGeometry( settings.value( "/Windows/PgSourceSelect/geometry" ).toByteArray() );
89+
90+
for ( int i = 0; i < mTableModel.columnCount(); i++ )
91+
{
92+
mTablesTreeView->setColumnWidth( i, settings.value( QString( "/Windows/PgSourceSelect/columnWidths/%1" ).arg( i ), mTablesTreeView->columnWidth( i ) ).toInt() );
93+
}
8994
}
9095
/** Autoconnected SLOTS **/
9196
// Slot for adding a new connection
@@ -255,6 +260,11 @@ QgsPgSourceSelect::~QgsPgSourceSelect()
255260

256261
QSettings settings;
257262
settings.setValue( "/Windows/PgSourceSelect/geometry", saveGeometry() );
263+
264+
for ( int i = 0; i < mTableModel.columnCount(); i++ )
265+
{
266+
settings.setValue( QString( "/Windows/PgSourceSelect/columnWidths/%1" ).arg( i ), mTablesTreeView->columnWidth( i ) );
267+
}
258268
}
259269

260270
void QgsPgSourceSelect::populateConnectionList()

0 commit comments

Comments
 (0)