looking for message in all DBCs in graphdialog

this is not perfect, since two different DBCs can still have messages with the same name. still an improvement though
This commit is contained in:
Bertrand
2021-02-26 07:45:53 +01:00
parent 8a1ce9f238
commit 6b5d733533
+9 -1
View File
@@ -357,7 +357,15 @@ void NewGraphDialog::handleDataLenUpdate()
void NewGraphDialog::copySignalToParamsUI()
{
DBC_MESSAGE *msg = dbcHandler->getFileByIdx(0)->messageHandler->findMsgByName(ui->cbMessages->currentText());
assocSignal = nullptr;
DBC_MESSAGE *msg = nullptr;
for(int i = 0; i < dbcHandler->getFileCount(); i++)
{
msg = dbcHandler->getFileByIdx(i)->messageHandler->findMsgByName(ui->cbMessages->currentText());
if (msg) break;
}
if (!msg) return;
DBC_SIGNAL *sig = msg->sigHandler->findSignalByName(ui->cbSignals->currentText());
if (!sig) return;