From f8d3501c22d5b37c5c727f6819025b58b7b7b289 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 25 Apr 2020 15:24:11 +0200 Subject: desktop: remove scrollto default parameter of DiveListView::selectDive() No caller was using that parameter. Signed-off-by: Berthold Stoeger --- desktop-widgets/divelistview.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'desktop-widgets/divelistview.cpp') 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 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 &newDiveSelection) -- cgit v1.2.3-70-g09d2