From 823e870765d52b471a0835d5727a26c6bf68b2d3 Mon Sep 17 00:00:00 2001 From: Sergey Starosek Date: Mon, 27 May 2013 20:27:14 +0300 Subject: Fix default zooming. Set default zoom level only when at least one dive selected and user have not changed it. Signed-off-by: Sergey Starosek Signed-off-by: Dirk Hohndel --- qt-ui/globe.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index fea564644..565d2867f 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -39,8 +39,6 @@ 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() @@ -90,6 +88,12 @@ void GlobeGPS::centerOn(dive* dive) prepareForGetDiveCoordinates(dive); return; } + + // set the zoom as seen from n kilometer above. 3km / 10,000ft seems pleasant + // do not change it it was already modified by user + if (!zoom()) + zoomView(zoomFromDistance(3)); + centerOn(longitude,latitude, true); } -- cgit v1.2.3-70-g09d2