Flowview will now automatically set the grid to support the frame data

length even for CAN-FD frames (Use Middle Mouse Button to force it to
different sizes)
This commit is contained in:
Collin Kidder
2022-12-04 22:29:46 -05:00
parent 79678af7ba
commit 549113f9e1
+3
View File
@@ -636,6 +636,7 @@ void FlowViewWindow::changeID(QString newID)
playbackTimer->stop();
playbackActive = false;
int maxBytes = 0;
for (int x = 0; x < modelFrames->count(); x++)
{
CANFrame thisFrame = modelFrames->at(x);
@@ -643,8 +644,10 @@ void FlowViewWindow::changeID(QString newID)
{
thisFrame.payload().clear();
frameCache.append(thisFrame);
if (thisFrame.payload().length() > maxBytes) maxBytes = thisFrame.payload().length();
}
}
ui->flowView->setBytesToDraw(maxBytes);
currentPosition = 0;
if (frameCache.count() == 0) return;