[composer] Fix calculation of world file parameters, make sure world file works correctly for atlas prints

This commit is contained in:
Nyall Dawson 2014-02-09 20:05:54 +11:00
parent f15c886940
commit d6810e8954

View File

@ -2373,10 +2373,10 @@ void QgsComposition::computeWorldFileParameters( double& a, double& b, double& c
return;
}
QRectF brect = mWorldFileMap->boundingRect();
QgsRectangle extent = mWorldFileMap->extent();
QRectF brect = mWorldFileMap->mapRectToScene( mWorldFileMap->rect() );
QgsRectangle extent = *mWorldFileMap->currentMapExtent();
double alpha = mWorldFileMap->rotation() / 180 * M_PI;
double alpha = mWorldFileMap->mapRotation() / 180 * M_PI;
double xr = extent.width() / brect.width();
double yr = extent.height() / brect.height();