Skip to content

Commit

Permalink
fix #5023
Browse files Browse the repository at this point in the history
  • Loading branch information
jef-n committed Feb 15, 2012
1 parent df5ba53 commit 474ca93
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions src/providers/postgres/qgspgsourceselect.cpp
Expand Up @@ -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();

Expand Down Expand Up @@ -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 )
Expand Down

0 comments on commit 474ca93

Please sign in to comment.