Fix for a warning that was happening
This commit is contained in:
+2
-2
@@ -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();
|
||||
}
|
||||
|
||||
@@ -160,6 +160,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
||||
temp.bus = 0;
|
||||
temp.ID = 0x100;
|
||||
temp.len = 0;
|
||||
temp.extended = false;
|
||||
temp.isReceived = true;
|
||||
temp.remote = false;
|
||||
temp.timestamp = 100000000;
|
||||
model->addFrame(temp, true);
|
||||
qApp->processEvents();
|
||||
tickGUIUpdate(); //force a GUI refresh so that the row exists to measure
|
||||
|
||||
Reference in New Issue
Block a user