diff options
author | Stefan Fuchs <sfuchs@gmx.de> | 2017-10-11 21:27:06 +0200 |
---|---|---|
committer | Robert C. Helling <helling@atdotde.de> | 2017-10-16 17:14:17 +0200 |
commit | 73d2ab8099ce08ab20f119a126334463ffd41b1e (patch) | |
tree | ba80715002dcbfbe8bc0aa029e99b881d3fa73f4 /qt-models/cylindermodel.cpp | |
parent | df6933326de3ff173b2bd3458d8b29dce8c0f88f (diff) | |
download | subsurface-73d2ab8099ce08ab20f119a126334463ffd41b1e.tar.gz |
Update diveplannerpoints cylinderidx when deleting a cylinder
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'qt-models/cylindermodel.cpp')
-rw-r--r-- | qt-models/cylindermodel.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp index 545341c78..6408342bc 100644 --- a/qt-models/cylindermodel.cpp +++ b/qt-models/cylindermodel.cpp @@ -576,11 +576,8 @@ void CylindersModel::remove(const QModelIndex &index) } changed = true; endRemoveRows(); - struct divecomputer *dc = &displayed_dive.dc; - while (dc) { - dc_cylinder_renumber(&displayed_dive, dc, mapping); - dc = dc->next; - } + cylinder_renumber(&displayed_dive, mapping); + DivePlannerPointsModel::instance()->cylinderRenumber(mapping); dataChanged(index, index); } |