summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Sander Kleijwegt <sander@myowndomain.nl>2015-09-04 12:23:19 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-09-12 08:28:13 -0700
commit6427564d33caf59a85e6521366afc5e82fefa5fd (patch)
tree39acb8085a07e306bc3a2e0de8baedc527b12842 /qt-models
parent8dafc32228fab06ae01b0f5cfe43cda6ea74f714 (diff)
downloadsubsurface-6427564d33caf59a85e6521366afc5e82fefa5fd.tar.gz
Hide current dive site from dive sites with same coordinates.
Signed-off-by: Sander Kleijwegt <sander@myowndomain.nl> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/divelocationmodel.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp
index 47037b576..6e1bbaadb 100644
--- a/qt-models/divelocationmodel.cpp
+++ b/qt-models/divelocationmodel.cpp
@@ -189,6 +189,7 @@ bool filter_same_gps_cb (QAbstractItemModel *model, int sourceRow, const QModelI
{
int ref_lat = displayed_dive_site.latitude.udeg;
int ref_lon = displayed_dive_site.longitude.udeg;
+ int ref_uuid = displayed_dive_site.uuid;
QSortFilterProxyModel *self = (QSortFilterProxyModel*) model;
int ds_uuid = self->sourceModel()->index(sourceRow, LocationInformationModel::UUID, parent).data().toInt();
@@ -197,5 +198,5 @@ bool filter_same_gps_cb (QAbstractItemModel *model, int sourceRow, const QModelI
if (!ds)
return false;
- return (ds->latitude.udeg == ref_lat && ds->longitude.udeg == ref_lon);
+ return (ds->latitude.udeg == ref_lat && ds->longitude.udeg == ref_lon && ds->uuid != ref_uuid);
} \ No newline at end of file