diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2015-11-09 12:21:31 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-12-06 09:28:06 -0800 |
commit | 731e96493213ee272174e7979d545aab9ea33286 (patch) | |
tree | 6fbb30af38eafa210b788e5a08ff5b7a11bcdf71 | |
parent | 0c2df219efc27a7fe0088c9b0d4ecf5e49e377b4 (diff) | |
download | subsurface-731e96493213ee272174e7979d545aab9ea33286.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>
-rw-r--r-- | qt-ui/maintab.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/maintab.cpp b/qt-ui/maintab.cpp index 0afb7b4c0..e8f692196 100644 --- a/qt-ui/maintab.cpp +++ b/qt-ui/maintab.cpp @@ -674,6 +674,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")); |