Skip to content

Commit 95a2ac0

Browse files
committed
Update layout map to use transform context
1 parent 4838e55 commit 95a2ac0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/core/layout/qgslayoutitemmap.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1498,7 +1498,7 @@ QPointF QgsLayoutItemMap::layoutMapPosForItem( const QgsAnnotation *annotation )
14981498
{
14991499
//need to reproject
15001500
// todo datum nyall set context
1501-
QgsCoordinateTransform t( annotationCrs, crs() );
1501+
QgsCoordinateTransform t( annotationCrs, crs(), mLayout->project() );
15021502
double z = 0.0;
15031503
try
15041504
{

src/core/layout/qgslayoutitemmapgrid.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2294,7 +2294,7 @@ int QgsLayoutItemMapGrid::crsGridParams( QgsRectangle &crsRect, QgsCoordinateTra
22942294

22952295
try
22962296
{
2297-
QgsCoordinateTransform tr( mMap->crs(), mCRS );
2297+
QgsCoordinateTransform tr( mMap->crs(), mCRS, mLayout->project() );
22982298
QPolygonF mapPolygon = mMap->transformedMapPolygon();
22992299
QRectF mbr = mapPolygon.boundingRect();
23002300
QgsRectangle mapBoundingRect( mbr.left(), mbr.bottom(), mbr.right(), mbr.top() );

src/core/layout/qgslayoutitemmapoverview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ void QgsLayoutItemMapOverview::draw( QPainter *painter )
7070

7171
// reproject extent
7272
QgsCoordinateTransform ct( overviewFrameMap->crs(),
73-
mMap->crs() );
73+
mMap->crs(), mLayout->project() );
7474
g = g.densifyByCount( 20 );
7575
try
7676
{

0 commit comments

Comments
 (0)