Merge pull request #22 from nbgsmk/master
Bandpass marker: init editor with "dB"
This commit is contained in:
commit
34f2c3255e
@ -39,13 +39,12 @@ MarkerWidget::~MarkerWidget()
|
|||||||
void MarkerWidget::on_bDelete_clicked()
|
void MarkerWidget::on_bDelete_clicked()
|
||||||
{
|
{
|
||||||
if (model.rowCount() <= 0) {
|
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();
|
QModelIndex ind = ui->treeView->currentIndex();
|
||||||
if ( ! ind.isValid() ) {
|
if ( ! ind.isValid() ) {
|
||||||
return; // add marker(s), then click bDelete without clicking on any marker (there is no index clicked in treeView)
|
return; // if no marker clicked/selected in treeView, the index is not valid
|
||||||
// alternative: select last marker, then proceede to delete it?
|
|
||||||
}
|
}
|
||||||
|
|
||||||
auto marker = model.markerFromIndex(ind);
|
auto marker = model.markerFromIndex(ind);
|
||||||
|
@ -768,6 +768,7 @@ SIUnitEdit *TraceMarker::getSettingsEditor()
|
|||||||
case Type::Lowpass:
|
case Type::Lowpass:
|
||||||
case Type::Highpass:
|
case Type::Highpass:
|
||||||
case Type::PeakTable:
|
case Type::PeakTable:
|
||||||
|
case Type::Bandpass: // initialize with "dB"
|
||||||
return new SIUnitEdit("db", " ", 3);
|
return new SIUnitEdit("db", " ", 3);
|
||||||
case Type::TOI:
|
case Type::TOI:
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user