diff options
author | Fabio Rueda <avances123@gmail.com> | 2019-09-15 10:11:27 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-09-21 16:10:25 -0700 |
commit | 356293da7d8b457885beca77e48574dd9c73ad5c (patch) | |
tree | d3aecd940504a5315f9d54a3a174dca446695fe7 /desktop-widgets/tab-widgets/TabDiveStatistics.cpp | |
parent | b3e5e5eef4dd7d64ec98702311f017648cefa856 (diff) | |
download | subsurface-356293da7d8b457885beca77e48574dd9c73ad5c.tar.gz |
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 <avances123@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets/tab-widgets/TabDiveStatistics.cpp')
-rw-r--r-- | desktop-widgets/tab-widgets/TabDiveStatistics.cpp | 6 |
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; |