summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-03-11 22:09:52 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-03-12 07:09:01 -0700
commit950ae951bcc948ee632946757e43fca8ce7400fe (patch)
tree578c55115030756b84a66832190f6e45f8734aac
parentff68fd7c0cefa0e02e81c89a1389095b45969639 (diff)
downloadsubsurface-950ae951bcc948ee632946757e43fca8ce7400fe.tar.gz
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>
-rw-r--r--qt-models/divetripmodel.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/qt-models/divetripmodel.cpp b/qt-models/divetripmodel.cpp
index 754d5e633..4236b32c3 100644
--- a/qt-models/divetripmodel.cpp
+++ b/qt-models/divetripmodel.cpp
@@ -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.