summaryrefslogtreecommitdiffstats
path: root/qt-ui/globe.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'qt-ui/globe.cpp')
-rw-r--r--qt-ui/globe.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index 78283e49e..24806d520 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -82,6 +82,7 @@ void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
int idx;
struct dive *dive;
bool clear = !(QApplication::keyboardModifiers() && Qt::ControlModifier);
+ bool toggle = !clear;
bool first = true;
for_each_dive(idx, dive) {
long lat_diff, lon_diff;
@@ -100,7 +101,7 @@ void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
mainWindow()->dive_list()->unselectDives();
clear = false;
}
- mainWindow()->dive_list()->selectDive(dive, first);
+ mainWindow()->dive_list()->selectDive(dive, first, toggle);
first = false;
}
}
@@ -129,10 +130,10 @@ void GlobeGPS::reload()
place->setCoordinate(dive->longitude.udeg / 1000000.0,dive->latitude.udeg / 1000000.0 , 0, GeoDataCoordinates::Degree);
// don't add dive locations twice, unless they are at least 50m apart
if (locationMap[QString(dive->location)]) {
- GeoDataPoint existingLocation = locationMap[QString(dive->location)]->coordinate();
+ GeoDataCoordinates existingLocation = locationMap[QString(dive->location)]->coordinate();
GeoDataLineString segment = GeoDataLineString();
segment.append(existingLocation);
- GeoDataPoint newLocation = place->coordinate();
+ GeoDataCoordinates newLocation = place->coordinate();
segment.append(newLocation);
double dist = segment.length(6371);
// the dist is scaled to the radius given - so with 6371km as radius