summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Nienhüser <[email protected]>2016-07-09 23:41:51 +0200
committerDennis Nienhüser <[email protected]>2016-07-09 23:42:20 +0200
commit78273c7eba862b526013411b80874ba874c5e6df (patch)
tree8750becc21260eabad93252d8b2d487b2c092ad4
parentc72cbc2cca9aa509c3626a927e99464b4ef10732 (diff)
Tweak auto zoom settings a bit
-rw-r--r--src/lib/marble/AutoNavigation.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/lib/marble/AutoNavigation.cpp b/src/lib/marble/AutoNavigation.cpp
index 7e2ce38..3eb17d4 100644
--- a/src/lib/marble/AutoNavigation.cpp
+++ b/src/lib/marble/AutoNavigation.cpp
@@ -277,21 +277,18 @@ void AutoNavigation::Private::adjustZoom( const GeoDataCoordinates &currentPosit
qreal distance = greatCircleDistance * radius;
if( speed != 0 ) {
- //time(in minutes) remaining to reach the border of the map
- qreal remainingTime = ( distance / speed ) * SEC2MIN;
+ // time (in seconds) remaining to reach the border of the map
+ qreal remainingTime = distance / speed;
- //tolerance time limits( in minutes ) before auto zooming
- qreal thresholdLow = 1.0;
- qreal thresholdHigh = 12.0 * thresholdLow;
+ // tolerance time limits (in seconds) before auto zooming
+ qreal thresholdLow = 15;
+ qreal thresholdHigh = 120;
m_selfInteraction = true;
if ( remainingTime < thresholdLow ) {
emit m_parent->zoomOut( Instant );
}
- else if ( remainingTime < thresholdHigh ) {
- /* zoom level optimal, nothing to do */
- }
- else {
+ else if ( remainingTime > thresholdHigh ) {
emit m_parent->zoomIn( Instant );
}
m_selfInteraction = false;