mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Filter: allow filtering multiple dive sites
In the edit-dive-site tab the filter is switched to a particular mode where only dives at that site are shown. If we want to reuse this for the dive-site tab the mode has to be extended to allow for multiple dive sites. This is trivially done by replacing a pointer by a vector of pointers. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
5aacd73a00
commit
afde4dce0d
3 changed files with 15 additions and 15 deletions
|
@ -184,7 +184,7 @@ void LocationInformationWidget::acceptChanges()
|
|||
MainWindow::instance()->setApplicationState("Default");
|
||||
MapWidget::instance()->endGetDiveCoordinates();
|
||||
MapWidget::instance()->repopulateLabels();
|
||||
MultiFilterSortModel::instance()->stopFilterDiveSite();
|
||||
MultiFilterSortModel::instance()->stopFilterDiveSites();
|
||||
}
|
||||
|
||||
void LocationInformationWidget::initFields(dive_site *ds)
|
||||
|
@ -195,7 +195,7 @@ void LocationInformationWidget::initFields(dive_site *ds)
|
|||
updateLabels();
|
||||
enableLocationButtons(dive_site_has_gps_location(ds));
|
||||
QSortFilterProxyModel *m = qobject_cast<QSortFilterProxyModel *>(ui.diveSiteListView->model());
|
||||
MultiFilterSortModel::instance()->startFilterDiveSite(ds);
|
||||
MultiFilterSortModel::instance()->startFilterDiveSites(QVector<dive_site *>{ ds });
|
||||
if (m)
|
||||
m->invalidate();
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue