diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-05-31 17:44:32 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-05-31 16:01:16 -0700 |
commit | b35e48c68e861039e338597f3c258ede7812c175 (patch) | |
tree | 6492d91d9b3365dd1499b51a62f0d6d99e7b8b93 /qt-models | |
parent | 8b96179d5952fdfbed5e10368986a25bb52a584b (diff) | |
download | subsurface-b35e48c68e861039e338597f3c258ede7812c175.tar.gz |
Fix off-by-one error
i is one greater than the number of dive_sites, use the correct nr.
Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-models')
-rw-r--r-- | qt-models/divelocationmodel.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index 164d85d95..a2b5606b7 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -42,8 +42,8 @@ void LocationInformationModel::update() endRemoveRows(); } if (i) { - beginInsertRows(QModelIndex(), 0, i); - internalRowCount = i; + beginInsertRows(QModelIndex(), 0, i-1); + internalRowCount = i-1; endInsertRows(); } } |