From 356293da7d8b457885beca77e48574dd9c73ad5c Mon Sep 17 00:00:00 2001 From: Fabio Rueda Date: Sun, 15 Sep 2019 10:11:27 +0200 Subject: If only one dive selected, only one temperature in stats tab In stats tab, when only one dive is selected, on one stat, only average is shown, except temperature which 3 same temps for max, min and avg are shown. [Dirk Hohndel: fixed whitespace] Signed-off-by: Fabio Rueda Signed-off-by: Dirk Hohndel --- desktop-widgets/tab-widgets/TabDiveStatistics.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'desktop-widgets') diff --git a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp index 9807b2a46..2de8a8013 100644 --- a/desktop-widgets/tab-widgets/TabDiveStatistics.cpp +++ b/desktop-widgets/tab-widgets/TabDiveStatistics.cpp @@ -70,8 +70,10 @@ void TabDiveStatistics::updateData() else ui->sacLimits->setAverage(""); - ui->tempLimits->setMaximum(get_temperature_string(stats_selection.max_temp, true)); - ui->tempLimits->setMinimum(get_temperature_string(stats_selection.min_temp, true)); + if (stats_selection.combined_count > 1) { + ui->tempLimits->setMaximum(get_temperature_string(stats_selection.max_temp, true)); + ui->tempLimits->setMinimum(get_temperature_string(stats_selection.min_temp, true)); + } if (stats_selection.combined_temp.mkelvin && stats_selection.combined_count) { temperature_t avg_temp; avg_temp.mkelvin = stats_selection.combined_temp.mkelvin / stats_selection.combined_count; -- cgit v1.2.3-70-g09d2