Skip to content
Permalink
Browse files

Restore default coordinate format to map units (fix #14319)

  • Loading branch information
nyalldawson committed Feb 17, 2016
1 parent 08577ac commit 800b521231b3655513c311a9578da0390dff2962
Showing with 3 additions and 3 deletions.
  1. +1 −1 src/app/qgsprojectproperties.cpp
  2. +2 −2 src/core/qgscoordinateutils.cpp
@@ -165,7 +165,7 @@ QgsProjectProperties::QgsProjectProperties( QgsMapCanvas* mapCanvas, QWidget *pa
// be overridden in the meanwhile by the projection selector
populateEllipsoidList();

QString format = QgsProject::instance()->readEntry( "PositionPrecision", "/DegreeFormat", "D" );
QString format = QgsProject::instance()->readEntry( "PositionPrecision", "/DegreeFormat", "MU" );
if ( format == "MU" && mCoordinateDisplayComboBox->findData( MapUnits ) >= 0 )
mCoordinateDisplayComboBox->setCurrentIndex( mCoordinateDisplayComboBox->findData( MapUnits ) );
else if ( format == "DM" )
@@ -29,7 +29,7 @@ int QgsCoordinateUtils::calculateCoordinatePrecision( double mapUnitsPerPixel, c

if ( automatic )
{
QString format = QgsProject::instance()->readEntry( "PositionPrecision", "/DegreeFormat", "D" );
QString format = QgsProject::instance()->readEntry( "PositionPrecision", "/DegreeFormat", "MU" );
bool formatGeographic = ( format == "DM" || format == "DMS" || format == "D" );

// we can only calculate an automatic precision if both map CRS and format are geographic or both not geographic
@@ -58,7 +58,7 @@ int QgsCoordinateUtils::calculateCoordinatePrecision( double mapUnitsPerPixel, c

QString QgsCoordinateUtils::formatCoordinateForProject( const QgsPoint& point, const QgsCoordinateReferenceSystem& destCrs, int precision )
{
QString format = QgsProject::instance()->readEntry( "PositionPrecision", "/DegreeFormat", "D" );
QString format = QgsProject::instance()->readEntry( "PositionPrecision", "/DegreeFormat", "MU" );

QgsPoint geo = point;
if ( format == "DM" || format == "DMS" || format == "D" )

0 comments on commit 800b521

Please sign in to comment.
You can’t perform that action at this time.