mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Filter: call update title directly in filter model
Instead of sending a signal when counts change, catching them in the filter widget and update the window title there, directly update the window title in the model. This removes a signal/slot pair. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
858d3e2eed
commit
5aacd73a00
4 changed files with 9 additions and 14 deletions
|
@ -241,6 +241,7 @@ void MultiFilterSortModel::myInvalidate()
|
|||
|
||||
// Tell the dive trip model to update the displayed-counts
|
||||
DiveTripModelBase::instance()->filterFinished();
|
||||
countsChanged();
|
||||
emit filterFinished();
|
||||
|
||||
#if !defined(SUBSURFACE_MOBILE)
|
||||
|
@ -296,7 +297,7 @@ void MultiFilterSortModel::divesAdded(dive_trip *, bool, const QVector<dive *> &
|
|||
if (!d->hidden_by_filter)
|
||||
++divesDisplayed;
|
||||
}
|
||||
emit countsChanged();
|
||||
countsChanged();
|
||||
}
|
||||
|
||||
void MultiFilterSortModel::divesDeleted(dive_trip *, bool, const QVector<dive *> &dives)
|
||||
|
@ -305,5 +306,10 @@ void MultiFilterSortModel::divesDeleted(dive_trip *, bool, const QVector<dive *>
|
|||
if (!d->hidden_by_filter)
|
||||
--divesDisplayed;
|
||||
}
|
||||
emit countsChanged();
|
||||
countsChanged();
|
||||
}
|
||||
|
||||
void MultiFilterSortModel::countsChanged()
|
||||
{
|
||||
updateWindowTitle();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue