summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--qt-ui/globe.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index aeaab2903..149f738e3 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -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)