summaryrefslogtreecommitdiffstats
path: root/qt-models
diff options
context:
space:
mode:
authorGravatar Stefan Fuchs <sfuchs@gmx.de>2017-10-20 10:16:37 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2017-10-20 07:55:18 -0400
commit93e2bda0709a2377f47e313aa0970daa4f2b66df (patch)
tree39c2fc11f4ac536ab6dcfa3f99198854d9d65534 /qt-models
parent59bf217157461e3406f3b7a08ef64367e2223531 (diff)
downloadsubsurface-93e2bda0709a2377f47e313aa0970daa4f2b66df.tar.gz
Do cylinder renumber for dive data points only when in planner mode
Amendment to 73d2ab8099ce08ab20f119a126334463ffd41b1e Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
Diffstat (limited to 'qt-models')
-rw-r--r--qt-models/cylindermodel.cpp6
1 files changed, 4 insertions, 2 deletions
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)