Skip to content
Permalink
Browse files

fix projections selection when CRSes from multiple authorities are pr…

…eselected

git-svn-id: http://svn.osgeo.org/qgis/trunk@13134 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef
jef committed Mar 21, 2010
1 parent 81fa1e2 commit 1d056de0e5e9d97a31f8181cc62f99c919dca768
Showing with 11 additions and 3 deletions.
  1. +11 −3 src/gui/qgsprojectionselector.cpp
@@ -251,10 +251,18 @@ QString QgsProjectionSelector::ogcWmsCrsFilterAsSqlExpression( QSet<QString> * c
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 + "'." );

0 comments on commit 1d056de

Please sign in to comment.
You can’t perform that action at this time.