Skip to content
Permalink
Browse files
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
  • Loading branch information
mhugent committed Dec 19, 2009
1 parent 6f23f9e commit f7542e0
Showing 1 changed file with 1 addition and 6 deletions.
@@ -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();

0 comments on commit f7542e0

Please sign in to comment.