summaryrefslogtreecommitdiffstats
path: root/map-widget
diff options
context:
space:
mode:
Diffstat (limited to 'map-widget')
-rw-r--r--map-widget/qmlmapwidgethelper.cpp9
1 files changed, 1 insertions, 8 deletions
diff --git a/map-widget/qmlmapwidgethelper.cpp b/map-widget/qmlmapwidgethelper.cpp
index 57ad01ad5..5454f5858 100644
--- a/map-widget/qmlmapwidgethelper.cpp
+++ b/map-widget/qmlmapwidgethelper.cpp
@@ -141,7 +141,6 @@ void MapWidgetHelper::selectVisibleLocations()
{
int idx;
struct dive *dive;
- bool selectedFirst = false;
m_selectedDiveIds.clear();
for_each_dive (idx, dive) {
struct dive_site *ds = get_dive_site_for_dive(dive);
@@ -153,18 +152,12 @@ void MapWidgetHelper::selectVisibleLocations()
QPointF point;
QMetaObject::invokeMethod(m_map, "fromCoordinate", Q_RETURN_ARG(QPointF, point),
Q_ARG(QGeoCoordinate, dsCoord));
- if (!qIsNaN(point.x())) {
- if (!selectedFirst) {
- m_mapLocationModel->setSelected(ds, false);
- selectedFirst = true;
- }
+ if (!qIsNaN(point.x()))
#ifndef SUBSURFACE_MOBILE // indexes on desktop
m_selectedDiveIds.append(idx);
- }
}
#else // use id on mobile instead of index
m_selectedDiveIds.append(dive->id);
- }
}
int last; // get latest dive chronologically
if (!m_selectedDiveIds.isEmpty()) {