Skip to content

Commit d6810e8

Browse files
committed
[composer] Fix calculation of world file parameters, make sure world file works correctly for atlas prints
1 parent f15c886 commit d6810e8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/core/composer/qgscomposition.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2373,10 +2373,10 @@ void QgsComposition::computeWorldFileParameters( double& a, double& b, double& c
23732373
return;
23742374
}
23752375

2376-
QRectF brect = mWorldFileMap->boundingRect();
2377-
QgsRectangle extent = mWorldFileMap->extent();
2376+
QRectF brect = mWorldFileMap->mapRectToScene( mWorldFileMap->rect() );
2377+
QgsRectangle extent = *mWorldFileMap->currentMapExtent();
23782378

2379-
double alpha = mWorldFileMap->rotation() / 180 * M_PI;
2379+
double alpha = mWorldFileMap->mapRotation() / 180 * M_PI;
23802380

23812381
double xr = extent.width() / brect.width();
23822382
double yr = extent.height() / brect.height();

0 commit comments

Comments
 (0)