diff options
author | Tomaz Canabrava <tomaz.canabrava@gmail.com> | 2015-06-04 00:13:09 -0300 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-06-03 21:41:21 -0700 |
commit | efeca584746da69ed3e798a2659f6bd1b6426f79 (patch) | |
tree | a3927863d4a355a52053cc8a84f6d84a5a8c0372 /qt-models/divelocationmodel.cpp | |
parent | 537dcb15e093a32f0588f3e4059a4d23e86f9bae (diff) | |
download | subsurface-efeca584746da69ed3e798a2659f6bd1b6426f79.tar.gz |
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>
Diffstat (limited to 'qt-models/divelocationmodel.cpp')
-rw-r--r-- | qt-models/divelocationmodel.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/qt-models/divelocationmodel.cpp b/qt-models/divelocationmodel.cpp index ea6efda95..234b4f16c 100644 --- a/qt-models/divelocationmodel.cpp +++ b/qt-models/divelocationmodel.cpp @@ -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; } |