mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Update diveplannerpoints cylinderidx when deleting a cylinder
Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
parent
df6933326d
commit
73d2ab8099
3 changed files with 10 additions and 5 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue