summaryrefslogtreecommitdiffstats
path: root/qt-models/cylindermodel.cpp
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-10-11 21:27:06 +0200
committerGravatar Robert C. Helling <helling@atdotde.de>2017-10-16 17:14:17 +0200
commit73d2ab8099ce08ab20f119a126334463ffd41b1e (patch)
treeba80715002dcbfbe8bc0aa029e99b881d3fa73f4 /qt-models/cylindermodel.cpp
parentdf6933326de3ff173b2bd3458d8b29dce8c0f88f (diff)
downloadsubsurface-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.cpp7
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);
}