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:
parent
2744714970
commit
221b1a9e01
@ -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();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user