diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-11-18 22:34:22 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-11-18 16:54:59 -0800 |
commit | 66fdd9bc9153b65de7459a0a25229cec5be03286 (patch) | |
tree | 10146a1158a8639d005a051e4c65c0fc3775fc54 /qt-ui | |
parent | 61ac0a7c8d45c0d96e75d5e55ad48c6def5f4257 (diff) | |
download | subsurface-66fdd9bc9153b65de7459a0a25229cec5be03286.tar.gz |
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>
Diffstat (limited to 'qt-ui')
-rw-r--r-- | qt-ui/models.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/qt-ui/models.cpp b/qt-ui/models.cpp index 63a5fda4f..b76bd6b8e 100644 --- a/qt-ui/models.cpp +++ b/qt-ui/models.cpp @@ -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){ |