From 9ead871d6456f8f19f6f0fe2413513ef4449253d Mon Sep 17 00:00:00 2001 From: Dirk Hohndel Date: Mon, 11 Nov 2013 06:23:18 +0900 Subject: Stop clicks on the globe from changing dive list selection while editing This caused us to get royally confused when manually adding a dive and trying to set the location through the marble widget. Fixes # 229 Signed-off-by: Dirk Hohndel --- qt-ui/globe.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'qt-ui/globe.cpp') diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index c2ae56536..9e733cefc 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -71,6 +71,10 @@ GlobeGPS::GlobeGPS(QWidget* parent) : MarbleWidget(parent), loadedDives(0) void GlobeGPS::mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit unit) { + // don't mess with the selection while the user is editing a dive + if (mainWindow()->information()->isEditing()) + return; + GeoDataCoordinates here(lon, lat, unit); long lon_udeg = rint(1000000 * here.longitude(GeoDataCoordinates::Degree)); long lat_udeg = rint(1000000 * here.latitude(GeoDataCoordinates::Degree)); -- cgit v1.2.3-70-g09d2