From a5e3a6fd5ec18d0bc776e57a12c73cb5df21d3ad Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Fri, 26 Jun 2015 20:27:06 -0700 Subject: [PATCH] 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 --- qt-ui/globe.cpp | 10 ++++++---- 1 file 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()