File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -371,14 +371,10 @@ QgsPgSourceSelect::~QgsPgSourceSelect()
371
371
372
372
void QgsPgSourceSelect::populateConnectionList ()
373
373
{
374
- QStringList keys = QgsPostgresConn::connectionList ();
375
- QStringList::Iterator it = keys.begin ();
374
+ cmbConnections->blockSignals ( true );
376
375
cmbConnections->clear ();
377
- while ( it != keys.end () )
378
- {
379
- cmbConnections->addItem ( *it );
380
- ++it;
381
- }
376
+ cmbConnections->addItems ( QgsPostgresConn::connectionList () );
377
+ cmbConnections->blockSignals ( false );
382
378
383
379
setConnectionListPosition ();
384
380
@@ -606,6 +602,7 @@ void QgsPgSourceSelect::setConnectionListPosition()
606
602
{
607
603
// If possible, set the item currently displayed database
608
604
QString toSelect = QgsPostgresConn::selectedConnection ();
605
+
609
606
cmbConnections->setCurrentIndex ( cmbConnections->findText ( toSelect ) );
610
607
611
608
if ( cmbConnections->currentIndex () < 0 )
You can’t perform that action at this time.
0 commit comments