fix bug when Msg ID is not set in DBC Editing Window
This commit is contained in:
+4
-1
@@ -382,7 +382,9 @@ void DBCMainEditor::onCellClickedMessage(int row, int col)
|
|||||||
{
|
{
|
||||||
if (col == 3) //3 is the signals field. If clicked we go to the signals dialog
|
if (col == 3) //3 is the signals field. If clicked we go to the signals dialog
|
||||||
{
|
{
|
||||||
QString idString = ui->MessagesTable->item(row, 0)->text();
|
QTableWidgetItem* msg = ui->MessagesTable->item(row, 0);
|
||||||
|
if(msg) {
|
||||||
|
QString idString = msg->text();
|
||||||
DBC_MESSAGE *message = dbcFile->messageHandler->findMsgByID(Utility::ParseStringToNum(idString));
|
DBC_MESSAGE *message = dbcFile->messageHandler->findMsgByID(Utility::ParseStringToNum(idString));
|
||||||
sigEditor->setMessageRef(message);
|
sigEditor->setMessageRef(message);
|
||||||
sigEditor->setFileIdx(fileIdx);
|
sigEditor->setFileIdx(fileIdx);
|
||||||
@@ -393,6 +395,7 @@ void DBCMainEditor::onCellClickedMessage(int row, int col)
|
|||||||
ui->MessagesTable->setItem(row, col, replacement);
|
ui->MessagesTable->setItem(row, col, replacement);
|
||||||
inhibitCellChanged = false;
|
inhibitCellChanged = false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DBCMainEditor::refreshNodesTable()
|
void DBCMainEditor::refreshNodesTable()
|
||||||
|
|||||||
Reference in New Issue
Block a user