From d611d97406b538eac9ce0df81caee5c6a6ca6b8e Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Fri, 9 Oct 2015 14:33:31 -0300 Subject: Do not show lack of coordinates as having same gps information The filter that takes care to show the dive sites that have the same gps information should not take into account dives that have no gps information. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-models/divelocationmodel.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'qt-models') diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index 6e1bbaadb..e7c9aa30d 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -198,5 +198,8 @@ bool filter_same_gps_cb (QAbstractItemModel *model, int sourceRow, const QModelI if (!ds) return false; + if (ds->latitude.udeg == 0 || ds->longitude.udeg == 0) + return false; + return (ds->latitude.udeg == ref_lat && ds->longitude.udeg == ref_lon && ds->uuid != ref_uuid); } \ No newline at end of file -- cgit v1.2.3-70-g09d2