1
0
Fork 0

Fix an assert in debug mode

This commit is contained in:
James Turner 2018-08-28 23:34:55 +01:00
parent 41687767b9
commit 47847a5a57

View file

@ -652,13 +652,15 @@ void AircraftItemModel::onScanAddedItems(int addedCount)
void AircraftItemModel::onLocalCacheCleared()
{
if (m_cachedLocalAircraftCount > 0) {
const int firstRow = 0;
const int lastRow = m_cachedLocalAircraftCount + 1;
const int lastRow = m_cachedLocalAircraftCount - 1;
beginRemoveRows(QModelIndex(), firstRow, lastRow);
m_delegateStates.remove(0, m_cachedLocalAircraftCount);
m_cachedLocalAircraftCount = 0;
endRemoveRows();
}
}
void AircraftItemModel::installFailed(QModelIndex index, simgear::pkg::Delegate::StatusCode reason)