Skip to content
Permalink
Browse files
labeling: when reprojecting on the fly don't modify the feature geome…
…try, so that geometry based expressions don't get reprojected twice (eg. $x/$y)
  • Loading branch information
jef-n committed May 15, 2014
1 parent 5774bc4 commit fedcb80ca8d979274b2d4aec45ea6aa28dc8df33
Showing with 7 additions and 1 deletion.
  1. +7 −1 src/core/qgspallabeling.cpp
@@ -1847,8 +1847,14 @@ void QgsPalLayerSettings::registerFeature( QgsFeature& f, const QgsRenderContext
return;
}

if ( ct ) // reproject the geometry if necessary
// reproject the geometry if necessary (but don't modify the features
// geometry so that geometry based expression keep working)
QScopedPointer<QgsGeometry> clonedGeometry;
if ( ct )
{
geom = new QgsGeometry( *geom );
clonedGeometry.reset( geom );

try
{
geom->transform( *ct );

0 comments on commit fedcb80

Please sign in to comment.