summaryrefslogtreecommitdiffstats
path: root/qt-ui/globe.cpp
diff options
context:
space:
mode:
authorGravatar Sergey Starosek <sergey.starosek@gmail.com>2013-05-25 14:14:16 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-05-25 08:18:13 -0700
commitdbb84188c2d323365e100a47cdddd6e793d5e068 (patch)
tree18022853404b4529b671ab77808513570b1ae14e /qt-ui/globe.cpp
parentfe66fe5ff6d508ab893bde99f74f5a73c68e8461 (diff)
downloadsubsurface-dbb84188c2d323365e100a47cdddd6e793d5e068.tar.gz
Fix GPS coordinates rounding.
Better round the coordinates. Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/globe.cpp')
-rw-r--r--qt-ui/globe.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/globe.cpp b/qt-ui/globe.cpp
index 5f99eaf3d..0bd8f3d83 100644
--- a/qt-ui/globe.cpp
+++ b/qt-ui/globe.cpp
@@ -110,8 +110,8 @@ void GlobeGPS::changeDiveGeoPosition(qreal lon, qreal lat, GeoDataCoordinates::U
return;
}
- editingDiveCoords->latitude.udeg = lat * 1000000.0;
- editingDiveCoords->longitude.udeg = lon * 1000000.0;
+ editingDiveCoords->latitude.udeg = lrint(lat * 1000000.0);
+ editingDiveCoords->longitude.udeg = lrint(lon * 1000000.0);
centerOn(lon, lat, true);
reload();
editingDiveCoords = 0;