diff options
author | 2014-11-12 14:10:49 -0800 | |
---|---|---|
committer | 2014-11-12 14:10:49 -0800 | |
commit | 2295e0c21ec403d3d026544b612ec84269843285 (patch) | |
tree | 04c1a651014e3c64a4d093edb2cdb13b5d428c77 /qt-ui/divelistview.cpp | |
parent | 0b7370adeb8fc966e90c0b62d6a5ff55cf3bec3b (diff) | |
parent | 0b318540318ffa62318f0d9b74c2b14306bd0d97 (diff) | |
download | subsurface-2295e0c21ec403d3d026544b612ec84269843285.tar.gz |
Merge branch 'fixFilterSelection'
Diffstat (limited to 'qt-ui/divelistview.cpp')
-rw-r--r-- | qt-ui/divelistview.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/qt-ui/divelistview.cpp b/qt-ui/divelistview.cpp index 0d7c4fa6d..f250e901a 100644 --- a/qt-ui/divelistview.cpp +++ b/qt-ui/divelistview.cpp @@ -314,6 +314,8 @@ void DiveListView::selectDive(int i, bool scrollto, bool toggle) void DiveListView::selectDives(const QList<int> &newDiveSelection) { int firstInList, newSelection; + struct dive *d; + if (!newDiveSelection.count()) return; @@ -335,7 +337,8 @@ void DiveListView::selectDives(const QList<int> &newDiveSelection) newSelection = dive_table.nr - 1; if (newSelection == firstInList) break; - selectDive(newSelection); + if ((d = get_dive(newSelection)) != NULL && !d->hidden_by_filter) + selectDive(newSelection); } QSortFilterProxyModel *m = qobject_cast<QSortFilterProxyModel *>(model()); QModelIndexList idxList = m->match(m->index(0, 0), DiveTripModel::DIVE_IDX, selected_dive, 2, Qt::MatchRecursive); |