From 7b4bf883134b49ad177f8970b5d46eb9aecd3b59 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 27 Oct 2014 12:35:19 -0700 Subject: Correctly save a re-planned dive In commit a85a219df325 ("Add ability to replan a dive that we planned before") I completely mishandled the saving of the replanned data. How embarrassing. Fixes #747 See #527 Signed-off-by: Dirk Hohndel --- qt-ui/mainwindow.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'qt-ui/mainwindow.cpp') diff --git a/qt-ui/mainwindow.cpp b/qt-ui/mainwindow.cpp index 53c24a099..0a6112b4f 100644 --- a/qt-ui/mainwindow.cpp +++ b/qt-ui/mainwindow.cpp @@ -408,6 +408,8 @@ void MainWindow::planCreated() dive_list()->selectDive(selected_dive); set_dive_nr_for_current_dive(); } + // make sure our UI is in a consistent state + ui.InfoWidget->updateDiveInfo(); showProfile(); refreshDisplay(); } @@ -452,7 +454,7 @@ void MainWindow::on_actionReplanDive_triggered() if (!plannerStateClean()) return; if (!current_dive || !current_dive->dc.model || strcmp(current_dive->dc.model, "planned dive")) { - qDebug() << current_dive->dc.model; + qDebug() << "trying to replan a dive that's not a planned dive:" << current_dive->dc.model; return; } ui.ListWidget->endSearch(); -- cgit v1.2.3-70-g09d2