Skip to content

Commit b91cbee

Browse files
committed
labeling: use transformation with datum
1 parent fb141e7 commit b91cbee

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/qgspallabeling.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -3323,8 +3323,8 @@ int QgsPalLabeling::prepareLayer( QgsVectorLayer* layer, QStringList& attrNames,
33233323

33243324
lyr.xform = &mMapSettings->mapToPixel();
33253325
lyr.ct = 0;
3326-
if ( mMapSettings->hasCrsTransformEnabled() )
3327-
lyr.ct = new QgsCoordinateTransform( layer->crs(), mMapSettings->destinationCrs() );
3326+
if ( mMapSettings->hasCrsTransformEnabled() && ctx.coordinateTransform() )
3327+
lyr.ct = ctx.coordinateTransform()->clone();
33283328
lyr.ptZero = lyr.xform->toMapCoordinates( 0, 0 );
33293329
lyr.ptOne = lyr.xform->toMapCoordinates( 1, 0 );
33303330

0 commit comments

Comments
 (0)