diff --git a/dbcmaineditor.cpp b/dbcmaineditor.cpp index d51fcc1..16fe836 100644 --- a/dbcmaineditor.cpp +++ b/dbcmaineditor.cpp @@ -405,6 +405,7 @@ void DBCMainEditor::refreshNodesTable() //insert a fresh entry at the bottom that contains nothing ui->NodesTable->insertRow(ui->NodesTable->rowCount()); + ui->NodesTable->selectRow(0); } void DBCMainEditor::refreshMessagesTable(const DBC_NODE *node) diff --git a/dbcsignaleditor.cpp b/dbcsignaleditor.cpp index 9792439..b3a5acf 100644 --- a/dbcsignaleditor.cpp +++ b/dbcsignaleditor.cpp @@ -348,6 +348,10 @@ void DBCSignalEditor::addNewSignal() void DBCSignalEditor::deleteCurrentSignal() { int currIdx = ui->signalsList->currentRow(); + + if(currIdx==ui->signalsList->count()-1) + return; + if (currIdx > -1) { delete(ui->signalsList->item(currIdx));