mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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:
parent
8b96179d59
commit
b35e48c68e
1 changed files with 2 additions and 2 deletions
|
@ -42,8 +42,8 @@ void LocationInformationModel::update()
|
||||||
endRemoveRows();
|
endRemoveRows();
|
||||||
}
|
}
|
||||||
if (i) {
|
if (i) {
|
||||||
beginInsertRows(QModelIndex(), 0, i);
|
beginInsertRows(QModelIndex(), 0, i-1);
|
||||||
internalRowCount = i;
|
internalRowCount = i-1;
|
||||||
endInsertRows();
|
endInsertRows();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue