mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
Do not let the dive have the 0 value.
The number 0 means "this dive has not been numbered". So manually assigning this seems wrong. Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
61ac0a7c8d
commit
66fdd9bc91
1 changed files with 3 additions and 0 deletions
|
@ -1020,6 +1020,9 @@ bool DiveItem::setData(const QModelIndex& index, const QVariant& value, int role
|
|||
return false;
|
||||
|
||||
int v = value.toInt();
|
||||
if (v == 0)
|
||||
return false;
|
||||
|
||||
int i;
|
||||
struct dive *d;
|
||||
for_each_dive(i, d){
|
||||
|
|
Loading…
Reference in a new issue