Skip to content
Browse files

Add an advanced settings key to allow disabling of the "pan distance"

message which shows in the status bar after a pan operation
  • Loading branch information
nyalldawson committed Feb 5, 2020
1 parent 438f0fa commit 947fe8d54a619b81d79b14dee85f28245dee4cbd
Showing with 8 additions and 0 deletions.
  1. +4 −0 resources/qgis_global_settings.ini
  2. +4 −0 src/app/qgisapp.cpp
@@ -54,6 +54,10 @@ maxRecentProjects=20
# notification to be shown when the task completes.

# Whether to show the distance panned message in the status bar after a map pan operation
# occurs. Set to false to disable the message.

# Whether to prompt users for a selection when multiple possible transformation paths exist
# when transforming coordinates. If false, a reasonable choice will be estimated by default
# without asking users. If true, users are always required to make this choice themselves.
@@ -13044,6 +13044,10 @@ void QgisApp::showRotation()

void QgisApp::showPanMessage( double distance, QgsUnitTypes::DistanceUnit unit, double bearing )
const bool showMessage = QgsSettings().value( QStringLiteral( "showPanDistanceInStatusBar" ), true, QgsSettings::App ).toBool();
if ( !showMessage )

const double distanceInProjectUnits = distance * QgsUnitTypes::fromUnitToUnitFactor( unit, QgsProject::instance()->distanceUnits() );
const int distanceDecimalPlaces = QgsSettings().value( QStringLiteral( "qgis/measure/decimalplaces" ), "3" ).toInt();
const QString distanceString = QgsDistanceArea::formatDistance( distanceInProjectUnits, distanceDecimalPlaces, QgsProject::instance()->distanceUnits() );

0 comments on commit 947fe8d

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