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/maintab.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/maintab.cpp')
-rw-r--r-- | desktop-widgets/maintab.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp index d181131a8..b5a156d68 100644 --- a/desktop-widgets/maintab.cpp +++ b/desktop-widgets/maintab.cpp @@ -431,6 +431,16 @@ void MainTab::refreshDiveInfo() updateDiveInfo(); } +void MainTab::updateDepthDuration() +{ + ui.depth->setVisible(true); + ui.depthLabel->setVisible(true); + ui.duration->setVisible(true); + ui.durationLabel->setVisible(true); + ui.duration->setText(QDateTime::fromTime_t(displayed_dive.duration.seconds).toUTC().toString("h:mm")); + ui.depth->setText(get_depth_string(displayed_dive.maxdepth, true)); +} + void MainTab::updateDiveInfo(bool clear) { ui.location->refreshDiveSiteCache(); |