From 66fdd9bc9153b65de7459a0a25229cec5be03286 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Mon, 18 Nov 2013 22:34:22 -0200 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-ui/models.cpp | 3 +++ 1 file changed, 3 insertions(+) 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){ -- cgit v1.2.3-70-g09d2