From 00d5ab1bdcabca68b1a03c3d414e7a8cea4168ea Mon Sep 17 00:00:00 2001 From: Linus Torvalds Date: Fri, 7 Jun 2013 18:25:30 -0700 Subject: Make a map ctrl-click toggle the selection state This way the map selection works like normal selections do. Except we don't do "ranged" selections (shift-click) for fairly obvious reasons. Signed-off-by: Linus Torvalds Signed-off-by: Dirk Hohndel --- qt-ui/globe.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-ui/globe.cpp') diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index 78283e49e..778118913 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; } } -- cgit v1.2.3-70-g09d2