Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix failing tests
  • Loading branch information
nyalldawson committed Apr 13, 2015
1 parent 7c7ef6d commit ffd81f4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/core/qgspallabeling.cpp
Expand Up @@ -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 );
Expand Down

0 comments on commit ffd81f4

Please sign in to comment.