Do not remove a Deco Stop by clicking on the trash

This patch forbids deletion of the Deco Stop from the
QTableView that holds the model.

Signed-off-by: Tomaz Canabrava <tomaz.canabrava@intel.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Tomaz Canabrava 2014-05-29 23:49:43 -03:00 committed by Dirk Hohndel
parent 2744714970
commit 221b1a9e01

View file

@ -656,6 +656,10 @@ void DivePlannerPointsModel::remove(const QModelIndex &index)
if (index.column() != REMOVE)
return;
divedatapoint dp = at(index.row());
if (!dp.entered)
return;
beginRemoveRows(QModelIndex(), index.row(), index.row());
divepoints.remove(index.row());
endRemoveRows();