Skip to content
Permalink
Browse files

Fix failing tests

  • Loading branch information
nyalldawson committed Apr 13, 2015
1 parent 7c7ef6d commit ffd81f4ca33b36c32d4fb430d62e12392626aa2b
Showing with 6 additions and 8 deletions.
  1. +6 −8 src/core/qgspallabeling.cpp
@@ -3360,20 +3360,18 @@ void QgsPalLabeling::registerFeature( const QString& layerID, QgsFeature& f, con

QgsGeometry* QgsPalLabeling::prepareGeometry( QgsGeometry* geometry, const QgsRenderContext& context, const QgsCoordinateTransform* ct, double minSize, QgsGeometry* clipGeometry )
{
QgsGeometry* geom = geometry;
if ( !geom )
if ( !geometry )
{
return 0;
}

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

//reproject the geometry if necessary
if ( ct )
{
geom = new QgsGeometry( *geom );
clonedGeometry.reset( geom );

try
{
geom->transform( *ct );

0 comments on commit ffd81f4

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