Merge branch 'fix_dbc_delete'
This commit is contained in:
@@ -13,6 +13,9 @@ CANConnection* CanConFactory::create(type pType, QString pPortName, QString pDri
|
|||||||
case SERIALBUS:
|
case SERIALBUS:
|
||||||
return new SerialBusConnection(pPortName, pDriverName);
|
return new SerialBusConnection(pPortName, pDriverName);
|
||||||
case GVRET_SERIAL:
|
case GVRET_SERIAL:
|
||||||
|
if(pPortName.contains("."))
|
||||||
|
return new GVRetSerial(pPortName, true);
|
||||||
|
else
|
||||||
return new GVRetSerial(pPortName, false);
|
return new GVRetSerial(pPortName, false);
|
||||||
case REMOTE:
|
case REMOTE:
|
||||||
return new GVRetSerial(pPortName, true); //it's a special case of GVRET connected over TCP/IP so it uses the same class
|
return new GVRetSerial(pPortName, true); //it's a special case of GVRET connected over TCP/IP so it uses the same class
|
||||||
|
|||||||
+5
-1
@@ -351,7 +351,11 @@ DBC_NODE* DBCFile::findNodeByNameAndComment(QString fullname)
|
|||||||
if (dbc_nodes.length() == 0) return nullptr;
|
if (dbc_nodes.length() == 0) return nullptr;
|
||||||
for (int i = 0; i < dbc_nodes.length(); i++)
|
for (int i = 0; i < dbc_nodes.length(); i++)
|
||||||
{
|
{
|
||||||
nameAndComment = dbc_nodes[i].name + " - " + dbc_nodes[i].comment;
|
if(dbc_nodes[i].comment.isEmpty())
|
||||||
|
nameAndComment = dbc_nodes[i].name;
|
||||||
|
else
|
||||||
|
nameAndComment = dbc_nodes[i].name + " - " + dbc_nodes[i].comment;
|
||||||
|
|
||||||
if (fullname.compare(nameAndComment, Qt::CaseInsensitive) == 0)
|
if (fullname.compare(nameAndComment, Qt::CaseInsensitive) == 0)
|
||||||
{
|
{
|
||||||
return &dbc_nodes[i];
|
return &dbc_nodes[i];
|
||||||
|
|||||||
@@ -111,8 +111,11 @@ void DBCNodeEditor::showEvent(QShowEvent* event)
|
|||||||
|
|
||||||
void DBCNodeEditor::refreshView()
|
void DBCNodeEditor::refreshView()
|
||||||
{
|
{
|
||||||
ui->lineComment->setText(dbcNode->comment);
|
if(dbcNode)
|
||||||
ui->lineMsgName->setText(dbcNode->name);
|
{
|
||||||
|
ui->lineComment->setText(dbcNode->comment);
|
||||||
|
ui->lineMsgName->setText(dbcNode->name);
|
||||||
|
}
|
||||||
|
|
||||||
//generateSampleText();
|
//generateSampleText();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user