Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix projections selection when CRSes from multiple authorities are pr…
…eselected

git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@13134 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
jef committed Mar 21, 2010
1 parent f205b4d commit 0df7056
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions src/gui/qgsprojectionselector.cpp
Expand Up @@ -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 + "'." );
Expand Down

0 comments on commit 0df7056

Please sign in to comment.