diff options
author | Sergey Starosek <sergey.starosek@gmail.com> | 2013-05-27 20:27:14 +0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-05-29 19:23:07 +0900 |
commit | 823e870765d52b471a0835d5727a26c6bf68b2d3 (patch) | |
tree | 0c8043bff70a2a617274f018ff8012fdec70c813 | |
parent | 57844a715112d9734ea657c15870e7d2e894fc1d (diff) | |
download | subsurface-823e870765d52b471a0835d5727a26c6bf68b2d3.tar.gz |
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 <sergey.starosek@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r-- | qt-ui/globe.cpp | 8 |
1 files 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); } |