From 0f1381f1609af6b9e7a09b3423741a4e713fbff4 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 18 Aug 2014 14:12:05 -0500 Subject: 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 --- qt-ui/mainwindow.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'qt-ui/mainwindow.cpp') 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(); } -- cgit v1.2.3-70-g09d2