diff options
author | Tomaz Canabrava <tomaz.canabrava@intel.com> | 2015-08-31 20:59:13 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-08-31 18:42:15 -0700 |
commit | a3d6098c8ce7bee6841872153a85b573d583430d (patch) | |
tree | 995fb9fdd1002f72ec30bdf9f0f1fbf79b26aea3 /qt-ui/locationinformation.cpp | |
parent | dcda950202545f0ecbe6a1192ec5aaae4af19227 (diff) | |
download | subsurface-a3d6098c8ce7bee6841872153a85b573d583430d.tar.gz |
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 <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/locationinformation.cpp')
-rw-r--r-- | qt-ui/locationinformation.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
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<QSortFilterProxyModel*>(ui.diveSiteListView->model()); emit startFilterDiveSite(displayed_dive_site.uuid); + if (m) + m->invalidate(); } emit requestCoordinates(); |