From 93e2bda0709a2377f47e313aa0970daa4f2b66df Mon Sep 17 00:00:00 2001 From: Stefan Fuchs Date: Fri, 20 Oct 2017 10:16:37 +0200 Subject: Do cylinder renumber for dive data points only when in planner mode Amendment to 73d2ab8099ce08ab20f119a126334463ffd41b1e Signed-off-by: Stefan Fuchs --- qt-models/cylindermodel.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'qt-models/cylindermodel.cpp') diff --git a/qt-models/cylindermodel.cpp b/qt-models/cylindermodel.cpp index ca5e74cff..1152e2863 100644 --- a/qt-models/cylindermodel.cpp +++ b/qt-models/cylindermodel.cpp @@ -577,7 +577,8 @@ void CylindersModel::remove(const QModelIndex &index) changed = true; endRemoveRows(); cylinder_renumber(&displayed_dive, mapping); - DivePlannerPointsModel::instance()->cylinderRenumber(mapping); + if (in_planner()) + DivePlannerPointsModel::instance()->cylinderRenumber(mapping); dataChanged(index, index); } @@ -599,7 +600,8 @@ void CylindersModel::moveAtFirst(int cylid) changed = true; endMoveRows(); cylinder_renumber(&displayed_dive, mapping); - DivePlannerPointsModel::instance()->cylinderRenumber(mapping); + if (in_planner()) + DivePlannerPointsModel::instance()->cylinderRenumber(mapping); } void CylindersModel::updateDecoDepths(pressure_t olddecopo2) -- cgit v1.2.3-70-g09d2