Fix for a warning that was happening

This commit is contained in:
Collin Kidder
2018-07-24 22:12:10 -04:00
parent ec6d716ae3
commit 693e29141c
2 changed files with 6 additions and 2 deletions
+2 -2
View File
@@ -410,7 +410,7 @@ void CANFrameModel::addFrame(const CANFrame& frame, bool autoRefresh = false)
frames.append(tempFrame);
if (filters[tempFrame.ID])
{
if (autoRefresh) beginInsertRows(QModelIndex(), filteredFrames.count() + 1, filteredFrames.count() + 1);
if (autoRefresh) beginInsertRows(QModelIndex(), filteredFrames.count(), filteredFrames.count());
filteredFrames.append(tempFrame);
if (autoRefresh) endInsertRows();
}
@@ -432,7 +432,7 @@ void CANFrameModel::addFrame(const CANFrame& frame, bool autoRefresh = false)
frames.append(tempFrame);
if (filters[tempFrame.ID])
{
if (autoRefresh) beginInsertRows(QModelIndex(), filteredFrames.count() + 1, filteredFrames.count() + 1);
if (autoRefresh) beginInsertRows(QModelIndex(), filteredFrames.count(), filteredFrames.count());
filteredFrames.append(tempFrame);
if (autoRefresh) endInsertRows();
}