mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
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>
This commit is contained in:
parent
7a85b9fb27
commit
3364e5b490
1 changed files with 3 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue