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>
This commit is contained in:
Tomaz Canabrava 2015-05-31 17:44:32 -03:00 committed by Dirk Hohndel
parent 8b96179d59
commit b35e48c68e

View file

@ -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();
}
}