Do cylinder renumber for dive data points only when in planner mode

Amendment to 73d2ab8099

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
Stefan Fuchs 2017-10-20 10:16:37 +02:00 committed by Dirk Hohndel
parent 59bf217157
commit 93e2bda070

View file

@ -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)