From 42d3223474d22815dd839eea63aa359427c22727 Mon Sep 17 00:00:00 2001 From: Collin Kidder Date: Thu, 8 Dec 2016 20:19:24 -0500 Subject: [PATCH] Fixes to DBC editor (from Viaccess-Orca commit) --- dbcmaineditor.cpp | 1 + dbcsignaleditor.cpp | 4 ++++ 2 files changed, 5 insertions(+) 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));