From 4243fcb9156218f54b3103ce7c8de6ea222f3cfb Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 1 May 2014 14:47:52 -0300 Subject: Dont set coordinates when two or more dives are selected If a trip is selected (or for other reasons more than one dive), this would change the GPS coordinates of the whole selection which almost certainly isn't what the user wanted. Instead, only allow changes of the coordinates on the globe if exactly one dive is selected. [Dirk Hohndel: massively rewritten and extended - but I didn't want to simply "steal" the commit from Tomaz... This now maintains the "zoom out mode" for dives without GPS coordinates and deals with edits of multiple dives that are initiated the "normal way" by starting to edit other data as well.] Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/globe.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'qt-ui/globe.h') diff --git a/qt-ui/globe.h b/qt-ui/globe.h index 51bda4878..91ea46c02 100644 --- a/qt-ui/globe.h +++ b/qt-ui/globe.h @@ -40,7 +40,8 @@ slots: void changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::Unit); void mouseClicked(qreal lon, qreal lat, GeoDataCoordinates::Unit); void fixZoom(); - void prepareForGetDiveCoordinates(); + void zoomOutForNoGPS(); + void prepareForGetDiveCoordinates(struct dive *dive); }; #else // NO_MARBLE -- cgit v1.2.3-70-g09d2