From 3364e5b49078e406c74375e16806db35c579ba3b Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Thu, 1 May 2014 21:26:18 -0700 Subject: Re-center on current dive if dive edit is canceled If the user changes the coordinates for a dive but then cancels the dive edit, the globe would stay at the location that was temporarily set and not rotate back to the still active coordinates. This fixes it. Signed-off-by: Dirk Hohndel --- qt-ui/maintab.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index b4b711445..28c497815 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -830,6 +830,9 @@ void MainTab::rejectChanges() } DivePlannerPointsModel::instance()->setPlanMode(DivePlannerPointsModel::NOTHING); MainWindow::instance()->dive_list()->setFocus(); + // the user could have edited the location and then canceled the edit + // let's get the correct location back in view + MainWindow::instance()->globe()->centerOn(current_dive); } #undef EDIT_TEXT2 -- cgit v1.2.3-70-g09d2