Fix RideEditor crash on last delete

If you delete the last ride and scroll down in the ride editor
GC will crash. This patch ensures the model is invalidated when
a ride is deleted.
This commit is contained in:
Mark Liversedge
2011-04-17 19:47:36 +01:00
parent 888ec7a6d9
commit 97053386d8
2 changed files with 4 additions and 0 deletions

View File

@@ -57,6 +57,9 @@ RideFileTableModel::deleted()
{
// we don't need to disconnect since they're free'd up by QT
ride = NULL;
beginResetModel();
endResetModel();
dataChanged(createIndex(0,0), createIndex(90,999999));
}
void