Skip to content

Commit

Permalink
Fix for bug #2117, wrong composer scale if units are degree
Browse files Browse the repository at this point in the history
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.
7 changes: 1 addition & 6 deletions src/core/composer/qgscomposermap.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit f7542e0

Please sign in to comment.