diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2017-02-26 12:05:23 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-03-04 12:16:49 -0800 |
commit | d36f056bded107ea78abb39b64b810a249d64966 (patch) | |
tree | 135b13d3109069a20ce17f3d3f50cafce4801f44 /desktop-widgets/mainwindow.cpp | |
parent | f1c46927effcc2182fff3f7acf507ba68cad8ade (diff) | |
download | subsurface-d36f056bded107ea78abb39b64b810a249d64966.tar.gz |
Get initial depth/duration correct when manually adding dive
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r-- | desktop-widgets/mainwindow.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp index 5bba49c57..b6faa3dff 100644 --- a/desktop-widgets/mainwindow.cpp +++ b/desktop-widgets/mainwindow.cpp @@ -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() |