Skip to content
Permalink
Browse files
Remember last wfs connection in dialog (ticket #2878)
git-svn-id: http://svn.osgeo.org/qgis/trunk@13906 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Jul 11, 2010
1 parent 3bc3db6 commit 15df931ec155b07778857c09ef342cd3e4781d63
Showing with 12 additions and 1 deletion.
  1. +11 −1 src/plugins/wfs/qgswfssourceselect.cpp
  2. +1 −0 src/plugins/wfs/qgswfssourceselect.h
@@ -47,7 +47,6 @@ QgsWFSSourceSelect::QgsWFSSourceSelect( QWidget* parent, QgisInterface* iface ):
connect( btnChangeSpatialRefSys, SIGNAL( clicked() ), this, SLOT( changeCRS() ) );
connect( treeWidget, SIGNAL( currentItemChanged( QTreeWidgetItem*, QTreeWidgetItem* ) ), this, SLOT( changeCRSFilter() ) );
populateConnectionList();

mProjectionSelector = new QgsGenericProjectionSelector( this );
mProjectionSelector->setMessage();
}
@@ -86,6 +85,11 @@ void QgsWFSSourceSelect::populateConnectionList()
btnEdit->setEnabled( false );
btnDelete->setEnabled( false );
}

//set last used connection
QSettings s;
QString selectedConnection = s.value( "/Qgis/connections-wfs/selected" ).toString();
cmbConnections->setCurrentIndex( cmbConnections->findText( selectedConnection ) );
}

QString QgsWFSSourceSelect::getPreferredCrs( const QSet<QString>& crsSet ) const
@@ -426,3 +430,9 @@ void QgsWFSSourceSelect::changeCRSFilter()
}
}
}

void QgsWFSSourceSelect::on_cmbConnections_activated( int index )
{
QSettings s;
s.setValue( "/Qgis/connections-wfs/selected", cmbConnections->currentText() );
}
@@ -80,6 +80,7 @@ class QgsWFSSourceSelect: public QDialog, private Ui::QgsWFSSourceSelectBase
void addLayer();
void changeCRS();
void changeCRSFilter();
void on_cmbConnections_activated( int index );

void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
};

0 comments on commit 15df931

Please sign in to comment.