mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
34b406556d
commit
ad5f1682ee
1 changed files with 1 additions and 6 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue