summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/tab-widgets/TabDiveStatistics.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveStatistics.cpp')
-rw-r--r--desktop-widgets/tab-widgets/TabDiveStatistics.cpp6
1 files changed, 4 insertions, 2 deletions
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;