diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2020-04-25 15:24:11 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2020-04-25 10:23:05 -0700 |
commit | f8d3501c22d5b37c5c727f6819025b58b7b7b289 (patch) | |
tree | dccfe2424c0a1e1f232f1c18c232a6fca0f4f3b3 | |
parent | e26ac9e58dfc75ca735ac0f59d4f912319be6ae2 (diff) | |
download | subsurface-f8d3501c22d5b37c5c727f6819025b58b7b7b289.tar.gz |
desktop: remove scrollto default parameter of DiveListView::selectDive()
No caller was using that parameter.
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r-- | desktop-widgets/divelistview.cpp | 10 | ||||
-rw-r--r-- | desktop-widgets/divelistview.h | 4 |
2 files changed, 5 insertions, 9 deletions
diff --git a/desktop-widgets/divelistview.cpp b/desktop-widgets/divelistview.cpp index c2b72fbed..b3988c8ff 100644 --- a/desktop-widgets/divelistview.cpp +++ b/desktop-widgets/divelistview.cpp @@ -306,7 +306,7 @@ QList<dive_trip_t *> DiveListView::selectedTrips() return ret; } -void DiveListView::selectDive(QModelIndex idx, bool scrollto) +void DiveListView::selectDive(QModelIndex idx) { if (!idx.isValid()) return; @@ -314,16 +314,12 @@ void DiveListView::selectDive(QModelIndex idx, bool scrollto) if (idx.parent().isValid()) { setAnimated(false); expand(idx.parent()); - if (scrollto) - scrollTo(idx.parent()); setAnimated(true); } - if (scrollto) - scrollTo(idx, PositionAtCenter); selectionChangeDone(); } -void DiveListView::selectDive(int i, bool scrollto) +void DiveListView::selectDive(int i) { if (i == -1) return; @@ -332,7 +328,7 @@ void DiveListView::selectDive(int i, bool scrollto) if (match.isEmpty()) return; QModelIndex idx = match.first(); - selectDive(idx, scrollto); + selectDive(idx); } void DiveListView::selectDives(const QList<int> &newDiveSelection) diff --git a/desktop-widgets/divelistview.h b/desktop-widgets/divelistview.h index f7bca9438..f372edc46 100644 --- a/desktop-widgets/divelistview.h +++ b/desktop-widgets/divelistview.h @@ -86,8 +86,8 @@ private: void addToTrip(int delta); void matchImagesToDives(QStringList fileNames); void loadImageFromURL(QUrl url); - void selectDive(QModelIndex index, bool scrollto = false); - void selectDive(int dive_table_idx, bool scrollto = false); + void selectDive(QModelIndex index); + void selectDive(int dive_table_idx); QNetworkAccessManager manager; }; |