diff options
author | Jan Mulder <jlmulder@xs4all.nl> | 2017-12-15 21:51:24 +0100 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2017-12-16 19:04:57 -0800 |
commit | b1d94b247067a5cb07d6bdf8a9c2519e5309c326 (patch) | |
tree | 830543d92f3fa946316475ba1fcb366a12d0ca3b /mobile-widgets/qmlmanager.cpp | |
parent | 2890be92568d36303e99e84501994572c2a16c6e (diff) | |
download | subsurface-b1d94b247067a5cb07d6bdf8a9c2519e5309c326.tar.gz |
mobile: manual add dive and cancel fails when repeated
This commit fixes a very subtle bug. Probably there for ages,
but never noticed. When manually adding a dive, and canceling
the add right away, the divetable was extended by 1 dive (using
the core function add_single_dive), but canceling never removed
that dive (using delete_single_dive). This is corrected here.
Notice that commit ef543da5aff296e claims to fix issue #950.
With this commit, however, that issue can be seen sometimes
again.
Signed-off-by: Jan Mulder <jlmulder@xs4all.nl>
Diffstat (limited to 'mobile-widgets/qmlmanager.cpp')
-rw-r--r-- | mobile-widgets/qmlmanager.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/mobile-widgets/qmlmanager.cpp b/mobile-widgets/qmlmanager.cpp index 1e56e444c..922fd8625 100644 --- a/mobile-widgets/qmlmanager.cpp +++ b/mobile-widgets/qmlmanager.cpp @@ -1260,6 +1260,7 @@ QString QMLManager::addDive() void QMLManager::addDiveAborted(int id) { DiveListModel::instance()->removeDiveById(id); + delete_single_dive(get_idx_by_uniq_id(id)); } QString QMLManager::getCurrentPosition() |