Fix for issue #163 where DBC messages would get set all black.

This commit is contained in:
Collin Kidder
2019-02-19 20:14:45 -05:00
parent 9f20906df3
commit 7988b1f02b
+4 -1
View File
@@ -284,6 +284,9 @@ void DBCMainEditor::onCellChangedMessage(int row,int col)
newMsg.name = "";
newMsg.sender = node;
newMsg.len = 0;
newMsg.fgColor = ui->MessagesTable->item(row, 4)->backgroundColor();
newMsg.bgColor = ui->MessagesTable->item(row, 5)->backgroundColor();
for (int i = 0; i < referenceFrames->length(); i++)
{
if ((uint) referenceFrames->at(i).ID == msgID)
@@ -548,7 +551,7 @@ void DBCMainEditor::insertBlankRow()
{
QTableWidgetItem *item = new QTableWidgetItem("");
if (i == 4) item->setBackgroundColor(QApplication::palette().color(QPalette::WindowText)); //foreground color
//if (i == 5) item->setBackgroundColor(ui->MessagesTable->palette().color(ui->MessagesTable->backgroundRole())); //background color
if (i == 5) item->setBackgroundColor(QApplication::palette().color(QPalette::Base));
item->setFlags(item->flags() & ~Qt::ItemIsEditable);
ui->MessagesTable->setItem(rowIdx, i, item);
}