1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-22 08:04:49 -05:00

In Spectrum Markers dialog, only display fixed power level when combo box is set to manual

This commit is contained in:
Jon Beniston 2022-02-10 10:51:53 +00:00
parent ba4bc76a05
commit c28fd88645

View File

@ -110,6 +110,8 @@ void SpectrumMarkersDialog::displayHistogramMarker()
ui->markerColor->setStyleSheet(tr("QLabel { background-color : rgb(%1,%2,%3); }").arg(r).arg(g).arg(b));
ui->showMarker->setChecked(m_histogramMarkers[m_histogramMarkerIndex].m_show);
}
ui->fixedPower->setVisible(m_histogramMarkers[m_histogramMarkerIndex].m_markerType == SpectrumHistogramMarker::SpectrumMarkerTypeManual);
ui->fixedPowerUnits->setVisible(m_histogramMarkers[m_histogramMarkerIndex].m_markerType == SpectrumHistogramMarker::SpectrumMarkerTypeManual);
ui->markerFrequency->blockSignals(false);
ui->centerFrequency->blockSignals(false);
@ -380,6 +382,9 @@ void SpectrumMarkersDialog::on_powerMode_currentIndexChanged(int index)
SpectrumHistogramMarker::SpectrumMarkerType newType = (SpectrumHistogramMarker::SpectrumMarkerType) index;
ui->fixedPower->setVisible(newType == SpectrumHistogramMarker::SpectrumMarkerTypeManual);
ui->fixedPowerUnits->setVisible(newType == SpectrumHistogramMarker::SpectrumMarkerTypeManual);
if ((m_histogramMarkers[m_histogramMarkerIndex].m_markerType != newType)
&& (newType == SpectrumHistogramMarker::SpectrumMarkerTypePowerMax))
{