summaryrefslogtreecommitdiffstats
path: root/qt-ui
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-26 20:27:06 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-06-26 20:28:42 -0700
commita5e3a6fd5ec18d0bc776e57a12c73cb5df21d3ad (patch)
tree2f11d7dce31ddb57c012d3978b92e9617c5e1648 /qt-ui
parent5fc31f6afcc3d6875cd9f31b77080a20ebafa437 (diff)
downloadsubsurface-a5e3a6fd5ec18d0bc776e57a12c73cb5df21d3ad.tar.gz
Globe: only remember the last zoom if we are not flying
No point in remembering the "current" zoom while we are flying to a new position. Also make sure you remember things before we start a new flight. Finally, set the radius to 1000 which is what Marble recommends for a zoom that shows the whole globe. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui')
-rw-r--r--qt-ui/globe.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index 9b50adccf..2188742de 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -286,13 +286,15 @@ void GlobeGPS::zoomOutForNoGPS()
// this is called if the dive has no GPS location.
// zoom out quite a bit to show the globe and remember that the next time
// we show a dive with GPS location we need to zoom in again
- if (fixZoomTimer->isActive())
- fixZoomTimer->stop();
- setZoom(0, Marble::Automatic);
if (!needResetZoom) {
needResetZoom = true;
- currentZoomLevel = zoom();
+ if (!fixZoomTimer->isActive())
+ currentZoomLevel = zoom();
}
+ if (fixZoomTimer->isActive())
+ fixZoomTimer->stop();
+ // 1000 is supposed to make sure you see the whole globe
+ setZoom(1000, Marble::Linear);
}
void GlobeGPS::endGetDiveCoordinates()