Correctly save a re-planned dive

In commit a85a219df3 ("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 <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2014-10-27 12:35:19 -07:00
parent 5888fa0778
commit 7b4bf88313
2 changed files with 10 additions and 2 deletions

View file

@ -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();