From a3d6098c8ce7bee6841872153a85b573d583430d Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 31 Aug 2015 20:59:13 -0300 Subject: Display dive sites with same gps as the current So we can merge them later - currently we are showing only the ID, ugly - fixing next. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/locationinformation.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'qt-ui') diff --git a/qt-ui/locationinformation.cpp b/qt-ui/locationinformation.cpp index 6006b18e5..4a4fff088 100644 --- a/qt-ui/locationinformation.cpp +++ b/qt-ui/locationinformation.cpp @@ -30,6 +30,11 @@ LocationInformationWidget::LocationInformationWidget(QWidget *parent) : QGroupBo connect(this, SIGNAL(stopFilterDiveSite()), MultiFilterSortModel::instance(), SLOT(stopFilterDiveSite())); connect(ui.geoCodeButton, SIGNAL(clicked()), this, SLOT(reverseGeocode())); + SsrfSortFilterProxyModel *filter_model = new SsrfSortFilterProxyModel(this); + filter_model->setSourceModel(LocationInformationModel::instance()); + filter_model->setFilterRow(filter_same_gps_cb); + ui.diveSiteListView->setModel(filter_model); + #ifndef NO_MARBLE // Globe Management Code. connect(this, &LocationInformationWidget::requestCoordinates, @@ -133,7 +138,10 @@ void LocationInformationWidget::showEvent(QShowEvent *ev) { if (displayed_dive_site.uuid) { updateLabels(); + QSortFilterProxyModel *m = qobject_cast(ui.diveSiteListView->model()); emit startFilterDiveSite(displayed_dive_site.uuid); + if (m) + m->invalidate(); } emit requestCoordinates(); -- cgit v1.2.3-70-g09d2