Attempts to debug an issue that causes files to load up with twice the
number of actual frames.
This commit is contained in:
+11
-3
@@ -362,19 +362,27 @@ void CANFrameModel::sendBulkRefresh(int num)
|
||||
//of how many by tracking the number we last knew about as opposed to how many rows there
|
||||
//are now.
|
||||
num = filteredFrames.count() - lastUpdateNumFrames;
|
||||
lastUpdateNumFrames += num; //done this way to avoid asking for filteredFrames.count() again
|
||||
|
||||
if (num < 0) return;
|
||||
|
||||
//qDebug() << "Num: " << num;
|
||||
|
||||
if (num == 0 && !overwriteDups) return;
|
||||
if (filteredFrames.count() == 0) return;
|
||||
|
||||
lastUpdateNumFrames += num; //done this way to avoid asking for filteredFrames.count() again
|
||||
|
||||
qDebug() << "Bulk refresh of " << num;
|
||||
|
||||
if (!overwriteDups)
|
||||
{
|
||||
mutex.lock();
|
||||
if (num > filteredFrames.count()) num = filteredFrames.count();
|
||||
beginInsertRows(QModelIndex(), filteredFrames.count() - num, filteredFrames.count() - 1);
|
||||
endInsertRows();
|
||||
//qDebug() << "From " << (filteredFrames.count() - num) << " to " << (filteredFrames.count() - 1);
|
||||
//beginInsertRows(QModelIndex(), filteredFrames.count() - num, filteredFrames.count() - 1);
|
||||
//endInsertRows();
|
||||
beginResetModel();
|
||||
endResetModel();
|
||||
mutex.unlock();
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user