mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 05:03:25 +00:00
Allow ctrl-click to select dives incrementally from the globe view
I guess we should support de-selecting dives this way too, but right now the interfaces only do selection. Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
d3442a81b3
commit
3677f4e5ea
1 changed files with 4 additions and 1 deletions
|
@ -81,6 +81,7 @@ void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
|
|||
|
||||
int idx;
|
||||
struct dive *dive;
|
||||
bool clear = !(QApplication::keyboardModifiers() && Qt::ControlModifier);
|
||||
bool first = true;
|
||||
for_each_dive(idx, dive) {
|
||||
long lat_diff, lon_diff;
|
||||
|
@ -95,8 +96,10 @@ void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
|
|||
if (lat_diff > resolve || lon_diff > resolve)
|
||||
continue;
|
||||
|
||||
if (first)
|
||||
if (clear) {
|
||||
mainWindow()->dive_list()->unselectDives();
|
||||
clear = false;
|
||||
}
|
||||
mainWindow()->dive_list()->selectDive(dive, first);
|
||||
first = false;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue