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>
This commit is contained in:
Dirk Hohndel 2015-06-26 20:27:06 -07:00
parent 5fc31f6afc
commit a5e3a6fd5e

View file

@ -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()