Fixes to allow New Graph Window to pick up DBC changes while the
program is running - also allow it to use more than one DBC file
This commit is contained in:
@@ -921,6 +921,8 @@ void GraphingWindow::loadDefinitions()
|
|||||||
|
|
||||||
void GraphingWindow::showParamsDialog(int idx = -1)
|
void GraphingWindow::showParamsDialog(int idx = -1)
|
||||||
{
|
{
|
||||||
|
dbcHandler = DBCHandler::getReference();
|
||||||
|
|
||||||
NewGraphDialog *thisDialog = new NewGraphDialog(dbcHandler);
|
NewGraphDialog *thisDialog = new NewGraphDialog(dbcHandler);
|
||||||
|
|
||||||
if (idx > -1)
|
if (idx > -1)
|
||||||
|
|||||||
@@ -90,7 +90,7 @@ void NewGraphDialog::setParams(GraphParams ¶ms)
|
|||||||
QPalette p = ui->colorSwatch->palette();
|
QPalette p = ui->colorSwatch->palette();
|
||||||
p.setColor(QPalette::Button, params.color);
|
p.setColor(QPalette::Button, params.color);
|
||||||
ui->colorSwatch->setPalette(p);
|
ui->colorSwatch->setPalette(p);
|
||||||
|
loadMessages();
|
||||||
drawBitfield();
|
drawBitfield();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -120,10 +120,13 @@ void NewGraphDialog::loadMessages()
|
|||||||
{
|
{
|
||||||
ui->cbMessages->clear();
|
ui->cbMessages->clear();
|
||||||
if (dbcHandler == NULL) return;
|
if (dbcHandler == NULL) return;
|
||||||
if (dbcHandler->getFileCount() == 0) dbcHandler->createBlankFile();
|
if (dbcHandler->getFileCount() == 0) return;
|
||||||
for (int x = 0; x < dbcHandler->getFileByIdx(0)->messageHandler->getCount(); x++)
|
for (int y = 0; y < dbcHandler->getFileCount(); y++)
|
||||||
{
|
{
|
||||||
ui->cbMessages->addItem(dbcHandler->getFileByIdx(0)->messageHandler->findMsgByIdx(x)->name);
|
for (int x = 0; x < dbcHandler->getFileByIdx(y)->messageHandler->getCount(); x++)
|
||||||
|
{
|
||||||
|
ui->cbMessages->addItem(dbcHandler->getFileByIdx(y)->messageHandler->findMsgByIdx(x)->name);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user