mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
Correctly decrease the number of rows in the dive_site model
We were removing the dive site, but forgetting to decrease the amount of rowCount, leading to crashes. Signed-off-by: Tomaz Canabrava <tomaz.canabrava@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
parent
537dcb15e0
commit
efeca58474
1 changed files with 1 additions and 0 deletions
|
@ -85,6 +85,7 @@ bool LocationInformationModel::removeRows(int row, int count, const QModelIndex
|
|||
struct dive_site *ds = get_dive_site(row);
|
||||
if (ds)
|
||||
delete_dive_site(ds->uuid);
|
||||
internalRowCount = dive_site_table.nr;
|
||||
endRemoveRows();
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue