From b77b876b46268073e54daab41f6816c9a97c9f0b Mon Sep 17 00:00:00 2001 From: Miklos Marton Date: Thu, 18 Jan 2024 16:53:13 +0100 Subject: [PATCH] Do not add extra newline on the DBC decoded message texts --- dbc/dbc_classes.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/dbc/dbc_classes.cpp b/dbc/dbc_classes.cpp index 09b7cb1b..da44f804 100644 --- a/dbc/dbc_classes.cpp +++ b/dbc/dbc_classes.cpp @@ -76,12 +76,16 @@ QString DBC_SIGNAL::processSignalTree(const CANFrame &frame) if (sig->processAsText(frame, sigString)) { qDebug() << "Returned value: " << sigString; + if (!build.isEmpty() && !sigString.isEmpty()) + build.append("\n"); build.append(sigString); - build.append("\n"); if (sig->isMultiplexor) { qDebug() << "Spelunkin!"; - build.append(sig->processSignalTree(frame)); + auto subTreeString = sig->processSignalTree(frame); + if (!build.isEmpty() && !subTreeString.isEmpty()) + build.append("\n"); + build.append(subTreeString); } } }