1
0
mirror of https://github.com/f4exb/sdrangel.git synced 2024-11-04 16:01:14 -05:00

SpectrumVis: propagate apply settings to GUI message quque if it exists

This commit is contained in:
f4exb 2023-04-09 06:20:22 +02:00
parent cbe8b2a1e5
commit 018fa27b02
3 changed files with 7 additions and 5 deletions

View File

@ -915,6 +915,12 @@ void SpectrumVis::applySettings(const SpectrumSettings& settings, bool force)
m_settings = settings; m_settings = settings;
m_settings.m_fftSize = fftSize; m_settings.m_fftSize = fftSize;
if (m_guiMessageQueue)
{
MsgConfigureSpectrumVis *msg = MsgConfigureSpectrumVis::create(m_settings, false);
m_guiMessageQueue->push(msg);
}
} }
void SpectrumVis::handleConfigureDSP(uint64_t centerFrequency, int sampleRate) void SpectrumVis::handleConfigureDSP(uint64_t centerFrequency, int sampleRate)

View File

@ -78,7 +78,7 @@ void GLSpectrum::setMeasurementParams(SpectrumSettings::Measurement measurement,
// Resize splitter so there's just enough space for the measurements table // Resize splitter so there's just enough space for the measurements table
// But don't use more than 50% // But don't use more than 50%
QList<int> sizes = m_splitter->sizes(); QList<int> sizes = m_splitter->sizes();
if ((sizes[0] == 0) && (sizes[1] == 0)) if (parentWidget() && (sizes[0] == 0) && (sizes[1] == 0))
{ {
// Initial sizing when first created // Initial sizing when first created
QSize s = parentWidget()->size(); QSize s = parentWidget()->size();

View File

@ -330,10 +330,6 @@ void GLSpectrumGUI::applySettings()
return; return;
} }
if (m_glSpectrum) {
applySpectrumSettings();
}
if (m_spectrumVis) if (m_spectrumVis)
{ {
SpectrumVis::MsgConfigureSpectrumVis *msg = SpectrumVis::MsgConfigureSpectrumVis::create(m_settings, false); SpectrumVis::MsgConfigureSpectrumVis *msg = SpectrumVis::MsgConfigureSpectrumVis::create(m_settings, false);