core: move divesite_has_gps_information() to struct dive_site

Seems logical in a C++ code base.

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-06-30 17:38:36 +02:00 committed by bstoeger
parent c812dd140b
commit 0aa4efb3d9
14 changed files with 20 additions and 21 deletions

View file

@ -168,7 +168,7 @@ void MapLocationModel::reload(QObject *map)
// Don't show dive sites of hidden dives, unless we're in dive site edit mode.
if (!diveSiteMode && !hasVisibleDive(*ds))
continue;
if (!dive_site_has_gps_location(ds.get())) {
if (!ds->has_gps_location()) {
// Dive sites that do not have a gps location are not shown in normal mode.
// In dive-edit mode, selected sites are placed at the center of the map,
// so that the user can drag them somewhere without having to enter coordinates.