summaryrefslogtreecommitdiffstats
path: root/mobile-widgets/qmlmanager.cpp
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2020-04-04 22:15:52 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2020-04-04 14:30:06 -0700
commit96d12f5a3943aa0f08a1af645d22d3e1de8b8727 (patch)
tree0cd8e25a6c2c3c708927c086e870821c05642949 /mobile-widgets/qmlmanager.cpp
parent4cdea48926456a96dd882f16d4dae48dcbb7ef23 (diff)
downloadsubsurface-96d12f5a3943aa0f08a1af645d22d3e1de8b8727.tar.gz
mobile: when creating gps dive site use the new dive site name
The code was using the pre-editing dive site name, which appears weird. Not sure if that was on purpose. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r--mobile-widgets/qmlmanager.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 46baf06f0..f3db0814b 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -935,7 +935,7 @@ bool QMLManager::checkLocation(DiveSiteChange &res, const DiveObjectHelper &myDi
if (parseGpsText(gps, &lat, &lon)) {
qDebug() << "parsed GPS, using it";
// there are valid GPS coordinates - just use them
- setupDivesite(res, d, ds, lat, lon, qPrintable(myDive.location));
+ setupDivesite(res, d, ds, lat, lon, qPrintable(location));
} else if (gps == GPS_CURRENT_POS) {
qDebug() << "gps was our default text for no GPS";
// user asked to use current pos
@@ -943,7 +943,7 @@ bool QMLManager::checkLocation(DiveSiteChange &res, const DiveObjectHelper &myDi
if (gpsString != GPS_CURRENT_POS) {
qDebug() << "but now I got a valid location" << gpsString;
if (parseGpsText(qPrintable(gpsString), &lat, &lon))
- setupDivesite(res, d, ds, lat, lon, qPrintable(myDive.location));
+ setupDivesite(res, d, ds, lat, lon, qPrintable(location));
} else {
appendTextToLog("couldn't get GPS location in time");
}