mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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
1 changed files with 4 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue