Get initial depth/duration correct when manually adding dive

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2017-02-26 12:05:23 -08:00
parent f1c46927ef
commit d36f056bde
3 changed files with 16 additions and 0 deletions

View file

@ -986,6 +986,11 @@ void MainWindow::on_actionAddDive_triggered()
DivePlannerPointsModel::instance()->createSimpleDive();
configureToolbar();
graphics()->plotDive();
fixup_dc_duration(&displayed_dive.dc);
displayed_dive.duration = displayed_dive.dc.duration;
// now that we have the correct depth and duration, update the dive info
information()->updateDepthDuration();
}
void MainWindow::on_actionEditDive_triggered()