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

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