summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar Berthold Stoeger <bstoeger@mail.tuwien.ac.at>2018-09-29 14:58:04 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-09-29 14:02:07 -0700
commitfbc4b2ac722820f41f25cd72eeda3ce54cc356d0 (patch)
tree95089b2aaed4e15f2799c14440f9b25df22ccf30 /mobile-widgets
parent41089b74a9b0acac484a188e2bf078b30e3f4c00 (diff)
downloadsubsurface-fbc4b2ac722820f41f25cd72eeda3ce54cc356d0.tar.gz
Mobile: don't call clear_dive() on deleteDive
clear_dive() will be called anyway in the subsequent call to copy_dive(). 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, 1 insertions, 3 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index 7df920478..67f99b8d5 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -1294,11 +1294,9 @@ void QMLManager::deleteDive(int id)
appendTextToLog("trying to delete non-existing dive");
return;
}
- // clean up (or create) the storage for the deleted dive and trip (if applicable)
+ // create the storage for the deleted dive and trip (if applicable)
if (!deletedDive)
deletedDive = alloc_dive();
- else
- clear_dive(deletedDive);
copy_dive(d, deletedDive);
if (!deletedTrip) {
deletedTrip = (struct dive_trip *)calloc(1, sizeof(struct dive_trip));