diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2014-08-18 14:12:05 -0500 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2014-08-18 14:12:05 -0500 |
commit | 0f1381f1609af6b9e7a09b3423741a4e713fbff4 (patch) | |
tree | b5bf9b406bc52bf4469c527a1a2196bbc4a18795 /qt-ui/mainwindow.cpp | |
parent | 88fe28636e775ab9dfbb7caa769d63045dc4d7ca (diff) | |
download | subsurface-0f1381f1609af6b9e7a09b3423741a4e713fbff4.tar.gz |
Planner: assign a dive number if the right number seems obvious
Use the same logic as we do for newly added dives.
As a side effect this patch appears to fix the issues with getting the
newly planned dive selected.
Fixes #692
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/mainwindow.cpp')
-rw-r--r-- | qt-ui/mainwindow.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 9912d60bd..b27f2b606 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -402,6 +402,12 @@ void MainWindow::planCanceled() void MainWindow::planCreated() { + // get the new dive selected and assign a number if reasonable + dive_list()->unselectDives(); + select_dive(dive_table.nr - 1); + dive_list()->selectDive(selected_dive); + set_dive_nr_for_current_dive(); + showProfile(); refreshDisplay(); } |