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 <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2015-06-03 23:04:55 -03:00 committed by Dirk Hohndel
parent 34b406556d
commit ad5f1682ee

View file

@ -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)