mirror of
https://github.com/jankae/LibreVNA.git
synced 2026-04-06 06:53:37 +00:00
vna.cpp - cosmetic change
siunitedit.cpp - keep text onFocus tracewidget.cpp - invalid index or empty list
This commit is contained in:
parent
53e587b4b8
commit
0e2395cf55
3 changed files with 25 additions and 8 deletions
|
|
@ -36,7 +36,11 @@ void TraceWidget::on_add_clicked()
|
|||
|
||||
void TraceWidget::on_remove_clicked()
|
||||
{
|
||||
model.removeTrace(ui->view->currentIndex().row());
|
||||
QModelIndex index = ui->view->currentIndex();
|
||||
if (index.isValid()) { // if nothing clicked, index.row() = -1
|
||||
model.removeTrace(index.row());
|
||||
// otherwise, TraceModel casts index to unsigned int and compares with traces.size() which is int
|
||||
};
|
||||
}
|
||||
|
||||
bool TraceWidget::eventFilter(QObject *, QEvent *event)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue