Skip to content

Commit ffd81f4

Browse files
committed
Fix failing tests
1 parent 7c7ef6d commit ffd81f4

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

src/core/qgspallabeling.cpp

+6-8
Original file line numberDiff line numberDiff line change
@@ -3360,20 +3360,18 @@ void QgsPalLabeling::registerFeature( const QString& layerID, QgsFeature& f, con
33603360

33613361
QgsGeometry* QgsPalLabeling::prepareGeometry( QgsGeometry* geometry, const QgsRenderContext& context, const QgsCoordinateTransform* ct, double minSize, QgsGeometry* clipGeometry )
33623362
{
3363-
QgsGeometry* geom = geometry;
3364-
if ( !geom )
3363+
if ( !geometry )
33653364
{
33663365
return 0;
33673366
}
33683367

3369-
// reproject the geometry if necessary (but don't modify the features
3370-
// geometry so that geometry based expression keep working)
3371-
QScopedPointer<QgsGeometry> clonedGeometry;
3368+
//don't modify the feature's geometry so that geometry based expressions keep working
3369+
QgsGeometry* geom = new QgsGeometry( *geometry );
3370+
QScopedPointer<QgsGeometry> clonedGeometry( geom );
3371+
3372+
//reproject the geometry if necessary
33723373
if ( ct )
33733374
{
3374-
geom = new QgsGeometry( *geom );
3375-
clonedGeometry.reset( geom );
3376-
33773375
try
33783376
{
33793377
geom->transform( *ct );

0 commit comments

Comments
 (0)