Skip to content

Commit cb0d9f0

Browse files
committedAug 29, 2012
Small tidying up, replacing with GEO_NONE
1 parent 412fedd commit cb0d9f0

File tree

5 files changed

+10
-12
lines changed

5 files changed

+10
-12
lines changed
 

‎src/app/qgsmaptoolfeatureaction.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616
#include "qgsmaptoolfeatureaction.h"
1717

18-
#include "qgsdistancearea.h"
1918
#include "qgsfeature.h"
2019
#include "qgsfield.h"
2120
#include "qgsgeometry.h"
@@ -111,7 +110,6 @@ bool QgsMapToolFeatureAction::doAction( QgsVectorLayer *layer, int x, int y )
111110
// load identify radius from settings
112111
QSettings settings;
113112
double identifyValue = settings.value( "/Map/identifyRadius", QGis::DEFAULT_IDENTIFY_RADIUS ).toDouble();
114-
QString ellipsoid = settings.value( "/qgis/measure/ellipsoid", "WGS84" ).toString();
115113

116114
if ( identifyValue <= 0.0 )
117115
identifyValue = QGis::DEFAULT_IDENTIFY_RADIUS;

‎src/app/qgsmaptoolidentify.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ bool QgsMapToolIdentify::identifyVectorLayer( QgsVectorLayer *layer, int x, int
204204
// load identify radius from settings
205205
QSettings settings;
206206
double identifyValue = settings.value( "/Map/identifyRadius", QGis::DEFAULT_IDENTIFY_RADIUS ).toDouble();
207-
QString ellipsoid = settings.value( "/qgis/measure/ellipsoid", "WGS84" ).toString();
207+
QString ellipsoid = settings.value( "/qgis/measure/ellipsoid", GEO_NONE ).toString();
208208

209209
if ( identifyValue <= 0.0 )
210210
identifyValue = QGis::DEFAULT_IDENTIFY_RADIUS;

‎src/app/qgsoptions.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WFlags fl ) :
283283

284284
getEllipsoidList();
285285
// Pre-select current ellipsoid
286-
QString myEllipsoidId = settings.value( "/qgis/measure/ellipsoid", "WGS84" ).toString();
286+
QString myEllipsoidId = settings.value( "/qgis/measure/ellipsoid", GEO_NONE ).toString();
287287
cmbEllipsoid->setCurrentIndex( cmbEllipsoid->findText( getEllipsoidName( myEllipsoidId ), Qt::MatchExactly ) );
288288
// Check if CRS transformation is on, or else turn combobox off
289289
if ( QgisApp::instance()->mapCanvas()->mapRenderer()->hasCrsTransformEnabled() )

‎src/core/qgsdistancearea.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ QgsDistanceArea::QgsDistanceArea()
4444
mEllipsoidalMode = false;
4545
mCoordTransform = new QgsCoordinateTransform;
4646
setSourceCrs( GEOCRS_ID ); // WGS 84
47-
setEllipsoid( "WGS84" );
47+
setEllipsoid( GEO_NONE );
4848
}
4949

5050

‎src/core/qgsexpression.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -773,15 +773,15 @@ static QVariant fcnRound( const QVariantList& values , QgsFeature *f, QgsExpress
773773
Q_UNUSED( f );
774774
if ( values.length() == 2 )
775775
{
776-
double number = getDoubleValue( values.at( 0 ), parent );
777-
double scaler = pow( 10.0, getIntValue( values.at( 1 ), parent ) );
778-
return QVariant( qRound( number * scaler ) / scaler );
776+
double number = getDoubleValue( values.at( 0 ), parent );
777+
double scaler = pow( 10.0, getIntValue( values.at( 1 ), parent ) );
778+
return QVariant( round( number * scaler ) / scaler );
779779
}
780780

781781
if ( values.length() == 1 )
782782
{
783-
double number = getIntValue( values.at( 0 ), parent );
784-
return QVariant( qRound( number) ).toInt();
783+
double number = getIntValue( values.at( 0 ), parent );
784+
return QVariant( round( number ) ).toInt();
785785
}
786786

787787
return QVariant();
@@ -933,10 +933,10 @@ bool QgsExpression::needsGeometry()
933933
void QgsExpression::initGeomCalculator()
934934
{
935935
mCalc = new QgsDistanceArea;
936-
mCalc->setEllipsoidalMode( false );
937936
QSettings settings;
938-
QString ellipsoid = settings.value( "/qgis/measure/ellipsoid", "WGS84" ).toString();
937+
QString ellipsoid = settings.value( "/qgis/measure/ellipsoid", GEO_NONE ).toString();
939938
mCalc->setEllipsoid( ellipsoid );
939+
mCalc->setEllipsoidalMode( false );
940940
}
941941

942942
bool QgsExpression::prepare( const QgsFieldMap& fields )

0 commit comments

Comments
 (0)
Please sign in to comment.