diff options
author | Robert C. Helling <helling@atdotde.de> | 2018-12-16 21:01:25 +0100 |
---|---|---|
committer | bstoeger <32835590+bstoeger@users.noreply.github.com> | 2018-12-17 12:18:26 +0100 |
commit | f0164e97a2d769aa63263756e53ccbf37e9bd0e5 (patch) | |
tree | 198e63f7a01c0760780f14befb46e28671edc6ef | |
parent | ac8db01873c7caa2ac475d987269ee26c6daa46a (diff) | |
download | subsurface-f0164e97a2d769aa63263756e53ccbf37e9bd0e5.tar.gz |
Show average max depth in statistics tab
This makes more sense than average depth. The min entry is also
about max depth for a dive.
Signed-off-by: Robert C. Helling <helling@atdotde.de>
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveStatistics.cpp | 14 | ||||
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveStatistics.ui | 2 |
2 files changed, 6 insertions, 10 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp index 67e80ed24..1b3fe9522 100644 --- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp +++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp @@ -48,17 +48,13 @@ void TabDiveStatistics::updateData() calculate_stats_selected(&stats_selection); clear(); ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true)); - if (amount_selected > 1) + if (amount_selected > 1) { ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, true)); - else + ui->depthLimits->setAverage(get_depth_string(stats_selection.combined_max_depth.mm / stats_selection.selection_size, true)); + } else { ui->depthLimits->setMinimum(""); - // the overall average depth is really confusing when listed between the - // deepest and shallowest dive - let's just not set it - // ui->depthLimits->setAverage(get_depth_string(stats_selection.avg_depth, true)); - - // Also hide the avgIco, so its clear that its not there. - ui->depthLimits->overrideAvgToolTipText(""); - ui->depthLimits->setAvgVisibility(false); + ui->depthLimits->setAverage(""); + } if (stats_selection.max_sac.mliter && (stats_selection.max_sac.mliter != stats_selection.avg_sac.mliter)) ui->sacLimits->setMaximum(get_volume_string(stats_selection.max_sac, true).append(tr("/min"))); diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.ui b/desktop-widgets/tab-widgets/TabDiveStatistics.ui index d954dca3b..1be4bbcfc 100644 --- a/desktop-widgets/tab-widgets/TabDiveStatistics.ui +++ b/desktop-widgets/tab-widgets/TabDiveStatistics.ui @@ -70,7 +70,7 @@ <item row="1" column="0"> <widget class="QGroupBox" name="groupBoxb"> <property name="title"> - <string>Depth</string> + <string>Max. depth</string> </property> <layout class="QHBoxLayout" name="statsDepthLayout"> <item> |