[QGIS Commit] r13906 - trunk/qgis/src/plugins/wfs
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Jul 11 08:05:25 EDT 2010
Author: mhugent
Date: 2010-07-11 12:05:25 +0000 (Sun, 11 Jul 2010)
New Revision: 13906
Modified:
trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp
trunk/qgis/src/plugins/wfs/qgswfssourceselect.h
Log:
Remember last wfs connection in dialog (ticket #2878)
Modified: trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp
===================================================================
--- trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp 2010-07-11 10:28:37 UTC (rev 13905)
+++ trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp 2010-07-11 12:05:25 UTC (rev 13906)
@@ -47,7 +47,6 @@
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 @@
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::on_cmbConnections_activated( int index )
+{
+ QSettings s;
+ s.setValue( "/Qgis/connections-wfs/selected", cmbConnections->currentText() );
+}
Modified: trunk/qgis/src/plugins/wfs/qgswfssourceselect.h
===================================================================
--- trunk/qgis/src/plugins/wfs/qgswfssourceselect.h 2010-07-11 10:28:37 UTC (rev 13905)
+++ trunk/qgis/src/plugins/wfs/qgswfssourceselect.h 2010-07-11 12:05:25 UTC (rev 13906)
@@ -80,6 +80,7 @@
void addLayer();
void changeCRS();
void changeCRSFilter();
+ void on_cmbConnections_activated( int index );
void on_buttonBox_helpRequested() { QgsContextHelp::run( metaObject()->className() ); }
};
More information about the QGIS-commit
mailing list