summaryrefslogtreecommitdiffstats
path: root/mobile-widgets
diff options
context:
space:
mode:
authorGravatar jan Iversen <jani@apache.org>2018-06-19 21:12:26 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2018-06-20 07:59:07 +0900
commit49f3da3bfd9f336108fd5d4c3977b41e90f75d3f (patch)
tree755edd0e5aff42ce2648fa9343258bb141738045 /mobile-widgets
parentcabc5859fdeeac3f2f23299c442baf4f33245991 (diff)
downloadsubsurface-49f3da3bfd9f336108fd5d4c3977b41e90f75d3f.tar.gz
mobile: set alloc_samples to 0 when resetting.
set alloc_samples = 0 when settings dc->sample = 0 and dc->samples = 0 Signed-off-by: Jan Iversen <jani@apache.org>
Diffstat (limited to 'mobile-widgets')
-rw-r--r--mobile-widgets/qmlmanager.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp
index e441428b9..8db7df7df 100644
--- a/mobile-widgets/qmlmanager.cpp
+++ b/mobile-widgets/qmlmanager.cpp
@@ -927,6 +927,7 @@ bool QMLManager::checkDuration(DiveObjectHelper *myDive, struct dive *d, QString
free(d->dc.sample);
d->dc.sample = 0;
d->dc.samples = 0;
+ d->dc.alloc_samples = 0;
} else {
appendTextToLog("Cannot change the duration on a dive that wasn't manually added");
}
@@ -949,6 +950,7 @@ bool QMLManager::checkDepth(DiveObjectHelper *myDive, dive *d, QString depth)
free(d->dc.sample);
d->dc.sample = 0;
d->dc.samples = 0;
+ d->dc.alloc_samples = 0;
}
return true;
}