diff options
Diffstat (limited to 'qt-ui/globe.cpp')
-rw-r--r-- | qt-ui/globe.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index d1c23ed33..10ce7058b 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -132,9 +132,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; + bool clear = !(QApplication::keyboardModifiers() & Qt::ControlModifier); QList<int> selectedDiveIds; for_each_dive(idx, dive) { long lat_diff, lon_diff; @@ -150,8 +148,9 @@ void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit) continue; selectedDiveIds.push_back(idx); - first = false; } + if(selectedDiveIds.empty()) + return; if (clear) { mainWindow()->dive_list()->unselectDives(); clear = false; |