diff options
author | Berthold Stoeger <bstoeger@mail.tuwien.ac.at> | 2019-04-12 15:47:41 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2019-04-12 18:19:07 +0300 |
commit | afde4dce0dc89e4ac7edbbffd5dd68a9ce96c5f1 (patch) | |
tree | eeecfd5a2aa34eb8f83d0562c87d1c13df7dad2e /desktop-widgets | |
parent | 5aacd73a00bac5721674b1f8b223d3aacc862a4c (diff) | |
download | subsurface-afde4dce0dc89e4ac7edbbffd5dd68a9ce96c5f1.tar.gz |
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>
Diffstat (limited to 'desktop-widgets')
-rw-r--r-- | desktop-widgets/locationinformation.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp index e5e14fadb..d935c4145 100644 --- a/desktop-widgets/locationinformation.cpp +++ b/desktop-widgets/locationinformation.cpp @@ -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 { |