From 6fc7e79e163b0343dffcdb61a532a0ebcfb93e95 Mon Sep 17 00:00:00 2001 From: Zoran Kostic <60575976+nbgsmk@users.noreply.github.com> Date: Mon, 14 Dec 2020 03:02:30 +0100 Subject: [PATCH] - Bandpass marker -init editor with "dB" --- Software/PC_Application/Traces/markerwidget.cpp | 5 ++--- Software/PC_Application/Traces/tracemarker.cpp | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Software/PC_Application/Traces/markerwidget.cpp b/Software/PC_Application/Traces/markerwidget.cpp index 8bb2d11..8f68f68 100644 --- a/Software/PC_Application/Traces/markerwidget.cpp +++ b/Software/PC_Application/Traces/markerwidget.cpp @@ -39,13 +39,12 @@ MarkerWidget::~MarkerWidget() void MarkerWidget::on_bDelete_clicked() { if (model.rowCount() <= 0) { - return; // prevent crash if bDelete clicked with no markers (empty model) + return; // there is nothing to delete (empty model) } QModelIndex ind = ui->treeView->currentIndex(); if ( ! ind.isValid() ) { - return; // add marker(s), then click bDelete without clicking on any marker (there is no index clicked in treeView) - // alternative: select last marker, then proceede to delete it? + return; // if no marker clicked/selected in treeView, the index is not valid } auto marker = model.markerFromIndex(ind); diff --git a/Software/PC_Application/Traces/tracemarker.cpp b/Software/PC_Application/Traces/tracemarker.cpp index ef5dfe1..cd5b4b0 100644 --- a/Software/PC_Application/Traces/tracemarker.cpp +++ b/Software/PC_Application/Traces/tracemarker.cpp @@ -759,6 +759,7 @@ SIUnitEdit *TraceMarker::getSettingsEditor() case Type::Lowpass: case Type::Highpass: case Type::PeakTable: + case Type::Bandpass: // initialize with "dB" return new SIUnitEdit("db", " ", 3); case Type::TOI: return nullptr;