summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
diff options
context:
space:
mode:
authorGravatar Fabio Rueda <avances123@gmail.com>2019-09-15 10:16:07 +0200
committerGravatar bstoeger <32835590+bstoeger@users.noreply.github.com>2019-09-15 20:55:55 +0200
commit8c82a1cb986334e56f817770d0397d144b92bad1 (patch)
tree906ef7d6a7f1af53fed09a89fdd9080fa3f1942b /desktop-widgets/tab-widgets/TabDiveStatistics.cpp
parente780b0a96cc30a44032b92c4e7bf5dce08c59cb1 (diff)
downloadsubsurface-8c82a1cb986334e56f817770d0397d144b92bad1.tar.gz
if only one dive, max depth show in average field
Signed-off-by: Fabio Rueda <avances123@gmail.com>
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveStatistics.cpp')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveStatistics.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
index 0cf3befd2..9807b2a46 100644
--- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
+++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
@@ -47,13 +47,14 @@ void TabDiveStatistics::updateData()
stats_t stats_selection;
calculate_stats_selected(&stats_selection);
clear();
- ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true));
if (amount_selected > 1) {
+ ui->depthLimits->setMaximum(get_depth_string(stats_selection.max_depth, true));
ui->depthLimits->setMinimum(get_depth_string(stats_selection.min_depth, true));
ui->depthLimits->setAverage(get_depth_string(stats_selection.combined_max_depth.mm / stats_selection.selection_size, true));
} else {
+ ui->depthLimits->setMaximum("");
ui->depthLimits->setMinimum("");
- ui->depthLimits->setAverage("");
+ ui->depthLimits->setAverage(get_depth_string(stats_selection.max_depth, true));
}
if (stats_selection.max_sac.mliter && (stats_selection.max_sac.mliter != stats_selection.avg_sac.mliter))