summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2017-02-26 12:05:23 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-03-04 12:16:49 -0800
commitd36f056bded107ea78abb39b64b810a249d64966 (patch)
tree135b13d3109069a20ce17f3d3f50cafce4801f44 /desktop-widgets/mainwindow.cpp
parentf1c46927effcc2182fff3f7acf507ba68cad8ade (diff)
downloadsubsurface-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.cpp5
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()