summaryrefslogtreecommitdiffstats
path: root/desktop-widgets
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-09 12:21:31 -0800
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-11-09 18:00:56 -0800
commit7b1950ca03ae928e3c51d74b8269e7054de7fdc8 (patch)
tree95a688d8f73eab32e32fbc40b9229f73efe345e6 /desktop-widgets
parente656c219a141be492c4ffe5a81eca83d0ce9290d (diff)
downloadsubsurface-7b1950ca03ae928e3c51d74b8269e7054de7fdc8.tar.gz
Statistics tab: clear min/max duration with just one dive selected
Otherwise if the user selects more than one dive, then goes back to just a single dive, the maximum and minimum duration of the previous selected group of dives stays visible which is clearly incorrect. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'desktop-widgets')
-rw-r--r--desktop-widgets/maintab.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/desktop-widgets/maintab.cpp b/desktop-widgets/maintab.cpp
index c36c69f20..96dfb7ce1 100644
--- a/desktop-widgets/maintab.cpp
+++ b/desktop-widgets/maintab.cpp
@@ -668,6 +668,9 @@ void MainTab::updateDiveInfo(bool clear)
if (amount_selected > 1) {
ui.timeLimits->setMaximum(get_time_string_s(stats_selection.longest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE)));
ui.timeLimits->setMinimum(get_time_string_s(stats_selection.shortest_time.seconds, 0, (displayed_dive.dc.divemode == FREEDIVE)));
+ } else {
+ ui.timeLimits->setMaximum("");
+ ui.timeLimits->setMinimum("");
}
ui.timeLimits->overrideMaxToolTipText(tr("Longest dive"));
ui.timeLimits->overrideMinToolTipText(tr("Shortest dive"));