Skip to content
Permalink
Browse files

Keep base units as default behavior (fix #15434)

  • Loading branch information
DelazJ committed Aug 23, 2016
1 parent 3bfd998 commit 2040cdf29f2758a759672eded8b680e47d2c1841
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 2040cdf

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