diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-06-03 23:04:55 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-03 21:34:27 -0700 |
commit | ad5f1682ee753beeed1132225d7e11a1ee221b57 (patch) | |
tree | b6f2452b4ae2ba1021e739fe3ce5ee3785434ac1 /qt-ui/globe.cpp | |
parent | 34b406556d083d9015cae9e553d6763a78fbd9cf (diff) | |
download | subsurface-ad5f1682ee753beeed1132225d7e11a1ee221b57.tar.gz |
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>
Diffstat (limited to 'qt-ui/globe.cpp')
-rw-r--r-- | qt-ui/globe.cpp | 7 |
1 files changed, 1 insertions, 6 deletions
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) |