From ad5f1682ee753beeed1132225d7e11a1ee221b57 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Wed, 3 Jun 2015 23:04:55 -0300 Subject: Clear up editDiveGeoPosition for the new approach We can only enter in editing state by opening the editing dialog, so the mainwindow check is now invalid. and also we shouldn't set the editingmode to false, since we will edit until the user clicks close. Signed-off-by: Tomaz Canabrava Signed-off-by: Dirk Hohndel --- qt-ui/globe.cpp | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'qt-ui') diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp index f75e582fc..64f9caae5 100644 --- a/qt-ui/globe.cpp +++ b/qt-ui/globe.cpp @@ -310,13 +310,9 @@ void GlobeGPS::prepareForGetDiveCoordinates() zoomOutForNoGPS(); } -// This needs to update the dive site, not just this dive void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::Unit unit) { - messageWidget->hide(); - - // TODO: Check if this is still necessary. - if (MainWindow::instance()->dive_list()->selectionModel()->selection().isEmpty()) + if (!editingDiveLocation) return; // convert to degrees if in radian. @@ -331,7 +327,6 @@ void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::U displayed_dive_site.longitude.udeg = lrint(lon * 1000000.0); emit coordinatesChanged(); repopulateLabels(); - editingDiveLocation = false; } void GlobeGPS::mousePressEvent(QMouseEvent *event) -- cgit v1.2.3-70-g09d2