Skip to content
Permalink
Browse files

Merge pull request #3404 from DelazJ/patch-13

Keep base units as default behavior (fix #15434)
  • Loading branch information
nyalldawson committed Aug 23, 2016
2 parents 6475fd2 + 2040cdf commit dfff9dd3ca792278606dd5daa89119f7dce937e6
Showing with 4 additions and 4 deletions.
  1. +1 −1 src/app/qgsmeasuredialog.cpp
  2. +1 −1 src/app/qgsoptions.cpp
  3. +2 −2 src/gui/qgsmaptoolidentify.cpp
@@ -249,7 +249,7 @@ void QgsMeasureDialog::saveWindowLocation()
QString QgsMeasureDialog::formatDistance( double distance, bool convertUnits ) const
{
QSettings settings;
bool baseUnit = settings.value( "/qgis/measure/keepbaseunit", false ).toBool();
bool baseUnit = settings.value( "/qgis/measure/keepbaseunit", true ).toBool();

if ( convertUnits )
distance = convertLength( distance, mDistanceUnits );
@@ -507,7 +507,7 @@ QgsOptions::QgsOptions( QWidget *parent, Qt::WindowFlags fl )
mDecimalPlacesSpinBox->setValue( decimalPlaces );

// set if base unit of measure tool should be changed
bool baseUnit = mSettings->value( "qgis/measure/keepbaseunit", false ).toBool();
bool baseUnit = mSettings->value( "qgis/measure/keepbaseunit", true ).toBool();
if ( baseUnit )
{
mKeepBaseUnitCheckBox->setChecked( true );
@@ -673,15 +673,15 @@ QgsUnitTypes::AreaUnit QgsMapToolIdentify::displayAreaUnits() const
QString QgsMapToolIdentify::formatDistance( double distance ) const
{
QSettings settings;
bool baseUnit = settings.value( "/qgis/measure/keepbaseunit", false ).toBool();
bool baseUnit = settings.value( "/qgis/measure/keepbaseunit", true ).toBool();

return QgsDistanceArea::formatDistance( distance, 3, displayDistanceUnits(), baseUnit );
}

QString QgsMapToolIdentify::formatArea( double area ) const
{
QSettings settings;
bool baseUnit = settings.value( "/qgis/measure/keepbaseunit", false ).toBool();
bool baseUnit = settings.value( "/qgis/measure/keepbaseunit", true ).toBool();

return QgsDistanceArea::formatArea( area, 3, displayAreaUnits(), baseUnit );
}

0 comments on commit dfff9dd

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