summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveStatistics.cpp14
-rw-r--r--desktop-widgets/tab-widgets/TabDiveStatistics.ui2
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>