thanks to willem to point it out
From 9cfcc8f0db5a8b7abb9a0f3a6ae32df2eeb5bf74 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava <[email protected]> Date: Fri, 9 Oct 2015 14:33:31 -0300 Subject: [PATCH] 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 <[email protected]> --- qt-models/divelocationmodel.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index 6e1bbaa..e7c9aa3 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 -- 2.6.1
_______________________________________________ subsurface mailing list [email protected] http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface
