diff options
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | qt-models/divelocationmodel.cpp | 5 |
2 files changed, 5 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index 76cd441fe..c7e3dd1c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,4 @@ +Desktop: ignore dive sites without location in proximity search Mobile: add personalized option for units Mobile: add Dive Summary page Mobile: option to reset default cylinder diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index 526a196de..5fca153a4 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -285,8 +285,11 @@ GeoReferencingOptionsModel::GeoReferencingOptionsModel(QObject *parent) : QStrin bool GPSLocationInformationModel::filterAcceptsRow(int sourceRow, const QModelIndex &parent) const { + if (!has_location(&location)) + return false; + struct dive_site *ds = sourceModel()->index(sourceRow, LocationInformationModel::DIVESITE, parent).data().value<dive_site *>(); - if (!ds || ds == ignoreDs || ds == RECENTLY_ADDED_DIVESITE) + if (!ds || ds == ignoreDs || ds == RECENTLY_ADDED_DIVESITE || !has_location(&ds->location)) return false; return distance <= 0 ? same_location(&ds->location, &location) |