Correctly trigger update of cylinder table trash icons in planner

Signed-off-by: Stefan Fuchs <sfuchs@gmx.de>
This commit is contained in:
Stefan Fuchs 2017-03-13 08:25:32 +01:00 committed by Dirk Hohndel
parent 2b5a2352ea
commit 8834fc0443
3 changed files with 9 additions and 0 deletions

View file

@ -24,6 +24,7 @@ void DivePlannerPointsModel::removeSelectedPoints(const QVector<int> &rows)
divepoints.remove(v2[i]);
}
endRemoveRows();
CylindersModel::instance()->updateTrashIcon();
}
void DivePlannerPointsModel::createSimpleDive()
@ -314,6 +315,7 @@ bool DivePlannerPointsModel::setData(const QModelIndex &index, const QVariant &v
case GAS:
if (value.toInt() >= 0 && value.toInt() < MAX_CYLINDERS)
p.cylinderid = value.toInt();
CylindersModel::instance()->updateTrashIcon();
break;
}
editStop(index.row(), p);
@ -732,6 +734,7 @@ void DivePlannerPointsModel::remove(const QModelIndex &index)
divepoints.remove(index.row());
}
endRemoveRows();
CylindersModel::instance()->updateTrashIcon();
}
struct diveplan &DivePlannerPointsModel::getDiveplan()