From 7b1950ca03ae928e3c51d74b8269e7054de7fdc8 Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 9 Nov 2015 12:21:31 -0800 Subject: 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 --- desktop-widgets/maintab.cpp | 3 +++ 1 file changed, 3 insertions(+) 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")); -- cgit v1.2.3-70-g09d2