From 549113f9e13f941d396c3b8d0aa99e3bb90931ed Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Sun, 4 Dec 2022 22:29:46 -0500 Subject: [PATCH] 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) --- re/flowviewwindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/re/flowviewwindow.cpp b/re/flowviewwindow.cpp index c4f416d..9e00d82 100644 --- a/re/flowviewwindow.cpp +++ b/re/flowviewwindow.cpp @@ -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;