[QGIS Commit] r13134 - trunk/qgis/src/gui
svn_qgis at osgeo.org
svn_qgis at osgeo.org
Sun Mar 21 11:30:17 EDT 2010
Author: jef
Date: 2010-03-21 11:30:15 -0400 (Sun, 21 Mar 2010)
New Revision: 13134
Modified:
trunk/qgis/src/gui/qgsprojectionselector.cpp
Log:
fix projections selection when CRSes from multiple authorities are preselected
Modified: trunk/qgis/src/gui/qgsprojectionselector.cpp
===================================================================
--- trunk/qgis/src/gui/qgsprojectionselector.cpp 2010-03-21 14:47:51 UTC (rev 13133)
+++ trunk/qgis/src/gui/qgsprojectionselector.cpp 2010-03-21 15:30:15 UTC (rev 13134)
@@ -251,10 +251,18 @@
if ( authParts.isEmpty() )
return sqlExpression;
- foreach( QString auth_name, authParts.keys() )
+ if( authParts.size() > 0 )
{
- sqlExpression += QString( " AND (auth_name='%1' AND auth_id IN ('%2'))" )
- .arg( auth_name ).arg( authParts[auth_name].join( "','" ) );
+ QString prefix = " AND (";
+ foreach( QString auth_name, authParts.keys() )
+ {
+ sqlExpression += QString( "%1(auth_name='%2' AND auth_id IN ('%3'))" )
+ .arg( prefix )
+ .arg( auth_name )
+ .arg( authParts[auth_name].join( "','" ) );
+ prefix = " OR ";
+ }
+ sqlExpression += ")";
}
QgsDebugMsg( "exiting with '" + sqlExpression + "'." );
More information about the QGIS-commit
mailing list