Restore the previous globe zoom level after showing dive without GPS

Thanks to commit 83c5ab5871 ("Zoom out when dive has no coords.") we
show more of the globe when displaying dives without GPS data - but that
caused us to forget the zoom level we used before and so the experience
when switching back to a dive with GPS data was disappointing.

This makes sure we track the last valid zoom level and restore it when
needed.

I also replaced the deprecated zoomView() calls with setZoom() calls.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-05-01 14:48:14 -07:00
parent c71d258024
commit 7f3b487c77
2 changed files with 26 additions and 10 deletions

View file

@ -32,6 +32,7 @@ private:
KMessageWidget *messageWidget;
QTimer *fixZoomTimer;
int currentZoomLevel;
bool needResetZoom;
bool editingDiveLocation;
public