Fixed nonfunctional node delete. Was due to trying to find node by name but
passing in the name and comment concatenated together. Made a new function to find by name+comment since extracting only name from the text in the column would require too much guessing.
This commit is contained in:
@@ -631,7 +631,7 @@ void DBCMainEditor::deleteCurrentTreeItem()
|
||||
{
|
||||
QTreeWidgetItem *currItem = ui->treeDBC->currentItem();
|
||||
int typ = currItem->data(0, Qt::UserRole).toInt();
|
||||
QString idString;
|
||||
QString idString, columnText;
|
||||
int msgID;
|
||||
DBC_MESSAGE *msg;
|
||||
DBC_NODE *node;
|
||||
@@ -642,7 +642,8 @@ void DBCMainEditor::deleteCurrentTreeItem()
|
||||
switch (typ)
|
||||
{
|
||||
case 1: //deleting a node cascades deletion down to messages and signals
|
||||
node = dbcFile->findNodeByName(currItem->text(0));
|
||||
columnText = currItem->text(0);
|
||||
node = dbcFile->findNodeByNameAndComment(columnText);
|
||||
if (!node) return;
|
||||
for (int x = 0; x < dbcFile->messageHandler->getCount(); x++)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user