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>
This commit is contained in:
parent
e656c219a1
commit
7b1950ca03
@ -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"));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user