From 78f9d8cd20f9da10e0eede1f1905a303ffe556da Mon Sep 17 00:00:00 2001 From: dolby360 Date: Mon, 9 Jan 2023 08:44:04 +0200 Subject: [PATCH] fix: update msg node color when adding a new message to dbc --- dbc/dbcmaineditor.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/dbc/dbcmaineditor.cpp b/dbc/dbcmaineditor.cpp index 05e7041..5e42d9c 100644 --- a/dbc/dbcmaineditor.cpp +++ b/dbc/dbcmaineditor.cpp @@ -675,6 +675,9 @@ void DBCMainEditor::newMessage() msgItem = nodeItem->parent(); nodeItem = msgItem->parent(); } + if (typ == DBCItemTypes::NODE){ + msgItem = nodeItem; + } //if there was a comment this will find the location of the comment and snip it out. QString nodeName = nodeItem->data(0, Qt::DisplayRole).toString().split(" - ")[0]; @@ -702,6 +705,7 @@ void DBCMainEditor::newMessage() msg.name = nodeName + "Msg" + QString::number(randGen.bounded(500)); msg.ID = 0; msg.len = 8; + msg.bgColor = QApplication::palette().color(QPalette::Base); } } else