mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
selection: rename selectionChanged() to divesSelected()
The signals/slot names for dive selection changes were a mess. Unify on divesSelected(). Firstly, selectionChanged() is a Qt thing. Secondly, it is consistent with tripSelected(). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
de2c4d93e0
commit
908da77863
6 changed files with 18 additions and 18 deletions
|
|
@ -26,14 +26,14 @@ void MultiFilterSortModel::resetModel(DiveTripModelBase::Layout layout)
|
|||
model.reset(new DiveTripModelList);
|
||||
|
||||
setSourceModel(model.get());
|
||||
connect(model.get(), &DiveTripModelBase::selectionChanged, this, &MultiFilterSortModel::selectionChangedSlot);
|
||||
connect(model.get(), &DiveTripModelBase::divesSelected, this, &MultiFilterSortModel::divesSelectedSlot);
|
||||
connect(model.get(), &DiveTripModelBase::tripSelected, this, &MultiFilterSortModel::tripSelectedSlot);
|
||||
model->initSelection();
|
||||
LocationInformationModel::instance()->update();
|
||||
}
|
||||
|
||||
// Translate selection into local indices and re-emit signal
|
||||
void MultiFilterSortModel::selectionChangedSlot(const QVector<QModelIndex> &indices, QModelIndex currentDive, int currentDC)
|
||||
void MultiFilterSortModel::divesSelectedSlot(const QVector<QModelIndex> &indices, QModelIndex currentDive, int currentDC)
|
||||
{
|
||||
QVector<QModelIndex> indicesLocal;
|
||||
indicesLocal.reserve(indices.size());
|
||||
|
|
@ -43,7 +43,7 @@ void MultiFilterSortModel::selectionChangedSlot(const QVector<QModelIndex> &indi
|
|||
indicesLocal.push_back(local);
|
||||
}
|
||||
|
||||
emit selectionChanged(indicesLocal, mapFromSource(currentDive), currentDC);
|
||||
emit divesSelected(indicesLocal, mapFromSource(currentDive), currentDC);
|
||||
}
|
||||
|
||||
// Translate selection into local indices and re-emit signal
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue