summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/locationinformation.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/locationinformation.cpp')
-rw-r--r--desktop-widgets/locationinformation.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/desktop-widgets/locationinformation.cpp b/desktop-widgets/locationinformation.cpp
index 20cc6fe1d..3e8a85fb6 100644
--- a/desktop-widgets/locationinformation.cpp
+++ b/desktop-widgets/locationinformation.cpp
@@ -156,8 +156,8 @@ void LocationInformationWidget::acceptChanges()
if (!ui.diveSiteCoordinates->text().isEmpty()) {
double lat, lon;
parseGpsText(ui.diveSiteCoordinates->text(), &lat, &lon);
- currentDs->latitude.udeg = lat * 1000000.0;
- currentDs->longitude.udeg = lon * 1000000.0;
+ currentDs->latitude.udeg = (int)(lat * 1000000.0);
+ currentDs->longitude.udeg = (int)(lon * 1000000.0);
}
if (dive_site_is_empty(currentDs)) {
LocationInformationModel::instance()->removeRow(get_divesite_idx(currentDs));
@@ -232,8 +232,8 @@ void LocationInformationWidget::on_diveSiteCoordinates_textChanged(const QString
if (!same_string(qPrintable(text), coords)) {
double latitude, longitude;
if (parseGpsText(text, &latitude, &longitude)) {
- displayed_dive_site.latitude.udeg = latitude * 1000000;
- displayed_dive_site.longitude.udeg = longitude * 1000000;
+ displayed_dive_site.latitude.udeg = (int)(latitude * 1000000);
+ displayed_dive_site.longitude.udeg = (int)(longitude * 1000000);
markChangedWidget(ui.diveSiteCoordinates);
emit coordinatesChanged();
ui.geoCodeButton->setEnabled(latitude != 0 && longitude != 0);