mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix for bug #2117, wrong composer scale if units are degree
git-svn-id: http://svn.osgeo.org/qgis/trunk@12516 c8812cc2-4d05-0410-92ff-de0c093fc19c
This commit is contained in:
parent
6f23f9e80c
commit
f7542e0e7d
@ -485,12 +485,7 @@ void QgsComposerMap::setNewScale( double scaleDenominator )
|
||||
}
|
||||
|
||||
double scaleRatio = scaleDenominator / currentScaleDenominator;
|
||||
|
||||
double newXMax = mExtent.xMinimum() + scaleRatio * ( mExtent.xMaximum() - mExtent.xMinimum() );
|
||||
double newYMax = mExtent.yMinimum() + scaleRatio * ( mExtent.yMaximum() - mExtent.yMinimum() );
|
||||
|
||||
QgsRectangle newExtent( mExtent.xMinimum(), mExtent.yMinimum(), newXMax, newYMax );
|
||||
mExtent = newExtent;
|
||||
mExtent.scale( scaleRatio );
|
||||
mCacheUpdated = false;
|
||||
emit extentChanged();
|
||||
cache();
|
||||
|
Loading…
x
Reference in New Issue
Block a user