diff options
Diffstat (limited to 'qt-models/diveplannermodel.cpp')
-rw-r--r-- | qt-models/diveplannermodel.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/qt-models/diveplannermodel.cpp b/qt-models/diveplannermodel.cpp index 57866b9e8..5fc692a38 100644 --- a/qt-models/diveplannermodel.cpp +++ b/qt-models/diveplannermodel.cpp @@ -353,6 +353,13 @@ void DivePlannerPointsModel::gaschange(const QModelIndex &index, int newcylinder emitDataChanged(); } +void DivePlannerPointsModel::cylinderRenumber(int mapping[]) +{ + for (int i = 0; i < rowCount(); i++) + divepoints[i].cylinderid = mapping[divepoints[i].cylinderid]; + emitDataChanged(); +} + QVariant DivePlannerPointsModel::headerData(int section, Qt::Orientation orientation, int role) const { if (role == Qt::DisplayRole && orientation == Qt::Horizontal) { |