divetripmodel: change current dive if no dives are selected

The DiveTripModelTree::divesSelected() returned early if
no dives were selected. Thus, the current dive was not
updated. Remove the check for no dives.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2020-03-11 22:09:52 +01:00 committed by Dirk Hohndel
parent ff68fd7c0c
commit 950ae951bc

View file

@ -1407,8 +1407,6 @@ QModelIndex DiveTripModelTree::diveToIdx(const dive *d) const
void DiveTripModelTree::divesSelected(const QVector<dive *> &divesIn, dive *current)
{
QVector <dive *> dives = visibleDives(divesIn);
if (dives.empty())
return;
// We got a number of dives that have been selected. Turn this into QModelIndexes and
// emit a signal, so that views can change the selection.