[QGIS Commit] r13907 - trunk/qgis/src/plugins/wfs

svn_qgis at osgeo.org svn_qgis at osgeo.org
Sun Jul 11 08:12:52 EDT 2010


Author: mhugent
Date: 2010-07-11 12:12:52 +0000 (Sun, 11 Jul 2010)
New Revision: 13907

Modified:
   trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp
Log:
Improvement to fix for 2878

Modified: trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp
===================================================================
--- trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp	2010-07-11 12:05:25 UTC (rev 13906)
+++ trunk/qgis/src/plugins/wfs/qgswfssourceselect.cpp	2010-07-11 12:12:52 UTC (rev 13907)
@@ -89,7 +89,11 @@
   //set last used connection
   QSettings s;
   QString selectedConnection = s.value( "/Qgis/connections-wfs/selected" ).toString();
-  cmbConnections->setCurrentIndex( cmbConnections->findText( selectedConnection ) );
+  int index = cmbConnections->findText( selectedConnection );
+  if( index != -1 )
+  {
+    cmbConnections->setCurrentIndex( index );
+  }
 }
 
 QString QgsWFSSourceSelect::getPreferredCrs( const QSet<QString>& crsSet ) const



More information about the QGIS-commit mailing list