Skip to content

Commit

Permalink
Changed to QgsProject also in qgscompersscalebar
Browse files Browse the repository at this point in the history
  • Loading branch information
homann committed Nov 25, 2012
1 parent 194d94c commit 3e91d38
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/core/composer/qgscomposerscalebar.cpp
Expand Up @@ -24,6 +24,7 @@
#include "qgssingleboxscalebarstyle.h"
#include "qgsticksscalebarstyle.h"
#include "qgsrectangle.h"
#include "qgsproject.h"
#include <QDomDocument>
#include <QDomElement>
#include <QFontMetricsF>
Expand Down Expand Up @@ -189,8 +190,8 @@ double QgsComposerScaleBar::mapWidth() const
QgsDistanceArea da;
da.setEllipsoidalMode( mComposerMap->mapRenderer()->hasCrsTransformEnabled() );
da.setSourceCrs( mComposerMap->mapRenderer()->destinationCrs().srsid() );
QSettings s;
da.setEllipsoid( s.value( "/qgis/measure/ellipsoid", "WGS84" ).toString() );
da.setEllipsoid( QgsProject::instance()->readEntry( "Measure", "/Ellipsoid", "WGS84" ) );

double measure = da.measureLine( QgsPoint( composerMapRect.xMinimum(), composerMapRect.yMinimum() ), QgsPoint( composerMapRect.xMaximum(), composerMapRect.yMinimum() ) );
if ( mUnits == Feet )
{
Expand Down

0 comments on commit 3e91d38

Please sign in to comment.