aboutsummaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2019-03-03 18:39:12 +0100
committerGravatar Dirk Hohndel <dirk@hohndel.org>2019-04-12 18:19:07 +0300
commit31291b1c56bf418732cf6ef52550aada492eff9b (patch)
tree4ff9e70839ced99fab1d13b7a38d43ece8171f4f /mobile-widgets
parentac1602f5125caae322e3e819a7c622b0be9feca1 (diff)
downloadsubsurface-31291b1c56bf418732cf6ef52550aada492eff9b.tar.gz
Dive site: set UUID only on save or load
Since the UUID will be overwritten on save and is only used on save and load, set it only on save or load. For other created dive sites, leave the UUID field uninitialized. This means that the UUID will change between saves. Let's see how the git saver handles that. Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
Diffstat (limited to 'mobile-widgets')
-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 4db9cbb63..3ec06dfe8 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -774,7 +774,7 @@ static void setupDivesite(struct dive *d, struct dive_site *ds, double lat, doub
if (ds) {
ds->location = location;
} else {
- d->dive_site = create_dive_site_with_gps(locationtext, &location, d->when, &dive_site_table);
+ d->dive_site = create_dive_site_with_gps(locationtext, &location, &dive_site_table);
}
}
@@ -892,7 +892,7 @@ bool QMLManager::checkLocation(DiveObjectHelper *myDive, struct dive *d, QString
diveChanged = true;
ds = get_dive_site_by_name(qPrintable(location), &dive_site_table);
if (!ds && !location.isEmpty())
- ds = create_dive_site(qPrintable(location), d->when, &dive_site_table);
+ ds = create_dive_site(qPrintable(location), &dive_site_table);
d->dive_site = ds;
}
// now make sure that the GPS coordinates match - if the user changed the name but not