Skip to content

Commit

Permalink
Set measureUnits also for myFirstLayer (otherwise wrong scale is shown)
Browse files Browse the repository at this point in the history
  • Loading branch information
rduivenvoorde authored and jef-n committed Apr 14, 2012
1 parent 71c4c7f commit 847650e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/app/legend/qgslegend.cpp
Expand Up @@ -937,7 +937,10 @@ void QgsLegend::addLayers( QList<QgsMapLayer *> theLayerList )
{
QgsMapLayer * myFirstLayer = theLayerList.at( 0 );
if ( !mMapCanvas->mapRenderer()->hasCrsTransformEnabled() )
{
mMapCanvas->mapRenderer()->setDestinationCrs( myFirstLayer->crs() );
mMapCanvas->mapRenderer()->setMapUnits( myFirstLayer->crs().mapUnits() );
}
mMapCanvas->zoomToFullExtent();
mMapCanvas->clearExtentHistory();
}
Expand Down

0 comments on commit 847650e

Please sign in to comment.