aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Tomaz Canabrava <tomaz.canabrava@gmail.com>2015-05-31 19:53:35 -0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-05-31 16:03:37 -0700
commitf28cec7b9eb5ad4bca007bcde9810e802e668768 (patch)
tree6f8a77ee1f84194173ffe429bce8e289aef84997
parentad9d1a81a2573360e42dc55f9d6dfd2e1f0631ab (diff)
downloadsubsurface-f28cec7b9eb5ad4bca007bcde9810e802e668768.tar.gz
Don't ask for globe-coordinates for a dive
Only ask that for dive_site_management. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-rw-r--r--qt-ui/globe.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index 5c4bbde6a..d4c7d49eb 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -255,10 +255,6 @@ void GlobeGPS::centerOnCurrentDive()
qreal longitude = ds->longitude.udeg / 1000000.0;
qreal latitude = ds->latitude.udeg / 1000000.0;
- if ((!dive_site_has_gps_location(ds) || MainWindow::instance()->information()->isEditing()) && amount_selected == 1) {
- prepareForGetDiveCoordinates();
- return;
- }
if (!dive_site_has_gps_location(ds)) {
zoomOutForNoGPS();
return;
@@ -319,9 +315,9 @@ void GlobeGPS::prepareForGetDiveCoordinates()
// This needs to update the dive site, not just this dive
void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::Unit unit)
{
- struct dive_site *ds;
messageWidget->hide();
+ // TODO: Check if this is still necessary.
if (MainWindow::instance()->dive_list()->selectionModel()->selection().isEmpty())
return;
@@ -335,7 +331,7 @@ void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::U
// change the location of the displayed_dive and put the UI in edit mode
displayed_dive_site.latitude.udeg = lrint(lat * 1000000.0);
displayed_dive_site.longitude.udeg = lrint(lon * 1000000.0);
- emit(coordinatesChanged());
+ emit coordinatesChanged();
repopulateLabels();
editingDiveLocation = false;
}