Skip to content
Permalink
Browse files
fix #5023
  • Loading branch information
jef-n committed Feb 15, 2012
1 parent df5ba53 commit 474ca93610150cc80030b7a8f83e6334f69e8385
Showing with 4 additions and 7 deletions.
  1. +4 −7 src/providers/postgres/qgspgsourceselect.cpp
@@ -371,14 +371,10 @@ QgsPgSourceSelect::~QgsPgSourceSelect()

void QgsPgSourceSelect::populateConnectionList()
{
QStringList keys = QgsPostgresConn::connectionList();
QStringList::Iterator it = keys.begin();
cmbConnections->blockSignals( true );
cmbConnections->clear();
while ( it != keys.end() )
{
cmbConnections->addItem( *it );
++it;
}
cmbConnections->addItems( QgsPostgresConn::connectionList() );
cmbConnections->blockSignals( false );

setConnectionListPosition();

@@ -606,6 +602,7 @@ void QgsPgSourceSelect::setConnectionListPosition()
{
// If possible, set the item currently displayed database
QString toSelect = QgsPostgresConn::selectedConnection();

cmbConnections->setCurrentIndex( cmbConnections->findText( toSelect ) );

if ( cmbConnections->currentIndex() < 0 )

0 comments on commit 474ca93

Please sign in to comment.