diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-05-01 21:26:18 -0700 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-05-01 21:26:18 -0700 |
commit | 3364e5b49078e406c74375e16806db35c579ba3b (patch) | |
tree | 75dafb60479615ea720fea2ea4c720ee40699a56 /qt-ui/maintab.cpp | |
parent | 7a85b9fb27f96c55e11e904fe3a68eba4ca79eba (diff) | |
download | subsurface-3364e5b49078e406c74375e16806db35c579ba3b.tar.gz |
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 <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/maintab.cpp')
-rw-r--r-- | qt-ui/maintab.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
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 |