diff options
author | Dirk Hohndel <dirk@hohndel.org> | 2016-02-20 09:36:14 -0800 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2016-02-20 09:36:14 -0800 |
commit | 38ab11a6c0299fb55944bdb1438d9ac357682d4d (patch) | |
tree | dbcc5d6485ea45565a2d10acdd771230eb48414e /qt-mobile | |
parent | 0b0e56edebc849818b7a76b1c4e809f357394e04 (diff) | |
download | subsurface-38ab11a6c0299fb55944bdb1438d9ac357682d4d.tar.gz |
Add option to allocate the samples in fake_dc()
We (ab)use fake_dc() to create a pleasing profile for a manually added
dive. Based on it's intended use, fake_dc() simply handed back a dc
structure that pointed at staticly allocated samples - that's obviously
(now that I think about it) going to blow up in my face if I edit a
manually added dive more than once.
So now we have an option for fake_dc() to actually allocate the samples -
this way the rest of the code can treat these samples as we would treat
samples created any other way. We can free them and replace them with a
new set.
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-mobile')
-rw-r--r-- | qt-mobile/qmlmanager.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/qt-mobile/qmlmanager.cpp b/qt-mobile/qmlmanager.cpp index 1f62cc5ea..91c63d893 100644 --- a/qt-mobile/qmlmanager.cpp +++ b/qt-mobile/qmlmanager.cpp @@ -556,7 +556,7 @@ QString QMLManager::commitChanges(QString diveId, QString date, QString location // first clear out the mean depth (or the fake_dc() function tries // to be too clever d->meandepth.mm = d->dc.meandepth.mm = 0; - d->dc = *fake_dc(&d->dc); + d->dc = *fake_dc(&d->dc, true); } DiveListModel::instance()->updateDive(oldIdx, d); } |