mirror of
https://github.com/subsurface/subsurface.git
synced 2025-01-19 14:25:27 +00:00
desktop: remove scrollto default parameter of DiveListView::selectDive()
No caller was using that parameter. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
e26ac9e58d
commit
f8d3501c22
2 changed files with 5 additions and 9 deletions
|
@ -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)
|
||||
|
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue