mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 03:33:25 +00:00
Make it possible to set the coordinates via map for all selected dives.
This patch makes it possible to set the coordinates on the map for all selected dives. Note however that after a coordinate is set, user cannot edit it unless he multi-edit it with a dive that doesn't have coordinate's set. this is just because it's missing a 'edit coords' button. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
1b77b67fdf
commit
188cdc7d06
1 changed files with 11 additions and 4 deletions
|
@ -222,13 +222,20 @@ void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::U
|
|||
if (!editingDiveCoords)
|
||||
return;
|
||||
|
||||
editingDiveCoords->latitude.udeg = lrint(lat * 1000000.0);
|
||||
editingDiveCoords->longitude.udeg = lrint(lon * 1000000.0);
|
||||
/* change everything on the selection. */
|
||||
int i;
|
||||
struct dive* dive;
|
||||
for_each_dive(i, dive){
|
||||
if(!dive->selected)
|
||||
continue;
|
||||
dive->latitude.udeg = lrint(lat * 1000000.0);
|
||||
dive->longitude.udeg = lrint(lon * 1000000.0);
|
||||
}
|
||||
centerOn(lon, lat, true);
|
||||
reload();
|
||||
editingDiveCoords = 0;
|
||||
messageWidget->animatedHide();
|
||||
mark_divelist_changed(TRUE);
|
||||
messageWidget->animatedHide();
|
||||
mainWindow()->refreshDisplay();
|
||||
}
|
||||
|
||||
void GlobeGPS::mousePressEvent(QMouseEvent* event)
|
||||
|
|
Loading…
Add table
Reference in a new issue