summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-12-28 10:22:10 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-12-29 16:19:56 -0800
commit691d44dfd16e60171e2f52417e08fb48bc308aa8 (patch)
tree7d8ef53ac26ddcd2f375254e729603aab1c046c1
parent1e1d7513b20021e9dc68c7631ae0d23a642ebc49 (diff)
downloadsubsurface-691d44dfd16e60171e2f52417e08fb48bc308aa8.tar.gz
Mobile: fix editing dive site
Commit 68961a169efc37039cd3fda334efb9ad9927444f made it impossible to edit a dive site on mobile if a dive-site was already set: If divesite was non-null, no actions were taken. Remove the conditional. Reported-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
-rw-r--r--mobile-widgets/qmlmanager.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 232b50cfa..d02f18cdd 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -887,11 +887,9 @@ bool QMLManager::checkLocation(DiveObjectHelper *myDive, struct dive *d, QString
qDebug() << "checkLocation" << location << "gps" << gps << "dive had" << myDive->location() << "gps" << myDive->gas();
if (myDive->location() != location) {
diveChanged = true;
- if (!ds)
- ds = get_dive_site_by_name(qPrintable(location));
- if (!ds && !location.isEmpty()) {
+ ds = get_dive_site_by_name(qPrintable(location));
+ if (!ds && !location.isEmpty())
ds = create_dive_site(qPrintable(location), d->when);
- }
d->dive_site = ds;
}
// now make sure that the GPS coordinates match - if the user changed the name but not