From efeca584746da69ed3e798a2659f6bd1b6426f79 Mon Sep 17 00:00:00 2001 From: Tomaz Canabrava Date: Thu, 4 Jun 2015 00:13:09 -0300 Subject: 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 Signed-off-by: Dirk Hohndel --- qt-models/divelocationmodel.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'qt-models') 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; } -- cgit v1.2.3-70-g09d2