From 49f3da3bfd9f336108fd5d4c3977b41e90f75d3f Mon Sep 17 00:00:00 2001 From: jan Iversen Date: Tue, 19 Jun 2018 21:12:26 +0200 Subject: 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 --- mobile-widgets/qmlmanager.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'mobile-widgets/qmlmanager.cpp') 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; } -- cgit v1.2.3-70-g09d2