[QGIS Commit] r12401 - trunk/qgis/src/app

svn_qgis at osgeo.org svn_qgis at osgeo.org
Thu Dec 10 10:58:58 EST 2009


Author: jef
Date: 2009-12-10 10:58:58 -0500 (Thu, 10 Dec 2009)
New Revision: 12401

Modified:
   trunk/qgis/src/app/qgspgsourceselect.cpp
Log:
[FEATURE] store column width for postgres layer selection dialog

Modified: trunk/qgis/src/app/qgspgsourceselect.cpp
===================================================================
--- trunk/qgis/src/app/qgspgsourceselect.cpp	2009-12-10 15:22:26 UTC (rev 12400)
+++ trunk/qgis/src/app/qgspgsourceselect.cpp	2009-12-10 15:58:58 UTC (rev 12401)
@@ -86,6 +86,11 @@
   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
@@ -255,6 +260,11 @@
 
   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()



More information about the QGIS-commit mailing list