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:
Tomaz Canabrava 2013-11-18 22:34:22 -02:00 committed by Dirk Hohndel
parent 61ac0a7c8d
commit 66fdd9bc91

View file

@ -1020,6 +1020,9 @@ bool DiveItem::setData(const QModelIndex& index, const QVariant& value, int role
return false; return false;
int v = value.toInt(); int v = value.toInt();
if (v == 0)
return false;
int i; int i;
struct dive *d; struct dive *d;
for_each_dive(i, d){ for_each_dive(i, d){