Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix for bug #2117, wrong composer scale if units are degree
git-svn-id: http://svn.osgeo.org/qgis/trunk/qgis@12516 c8812cc2-4d05-0410-92ff-de0c093fc19c
  • Loading branch information
mhugent committed Dec 19, 2009
1 parent 06cbd6d commit 501d9a5
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/core/composer/qgscomposermap.cpp
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 501d9a5

Please sign in to comment.