Set a pleasant zoom level to start out with

If the user very quickly switches between dives the zoom level sometimes
gets reset to be much more "zoomed out" (basically if you change dives
before Marble had time to zoom all the way in to the previous dive it will
keep whatever was the last zoom level of the animation - I'd consider that
a Marble bug).

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2013-05-25 11:13:15 -07:00
parent 92ee374494
commit 4409d61f7c

View file

@ -39,6 +39,8 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0)
setShowOverviewMap(false);
setShowScaleBar(true);
setShowCompass(false);
// set the zoom as seen from n kilometer above. 3km / 10,000ft seems pleasant
zoomView(zoomFromDistance(3));
}
void GlobeGPS::reload()
@ -88,7 +90,6 @@ void GlobeGPS::centerOn(dive* dive)
prepareForGetDiveCoordinates(dive);
return;
}
centerOn(longitude,latitude, true);
}