Avoid creating parameter components that are needed in the main GUI

This commit is contained in:
xenakios 2018-04-29 18:48:28 +03:00
parent 2f4c8d4075
commit c4b2ead50d

View File

@ -95,10 +95,17 @@ PaulstretchpluginAudioProcessorEditor::PaulstretchpluginAudioProcessorEditor(Pau
i == cpi_freefilter_tilty || i == cpi_freefilter_randomy_amount || i == cpi_freefilter_randomy_numbands i == cpi_freefilter_tilty || i == cpi_freefilter_randomy_amount || i == cpi_freefilter_randomy_numbands
|| i == cpi_freefilter_randomy_rate) || i == cpi_freefilter_randomy_rate)
group_id = 7; group_id = 7;
m_parcomps.emplace_back(std::make_unique<ParameterComponent>(pars[i], notifyonlyonrelease));
m_parcomps.back()->m_group_id = group_id;
if (group_id >= -1) if (group_id >= -1)
addAndMakeVisible(m_parcomps.back().get()); {
m_parcomps.emplace_back(std::make_unique<ParameterComponent>(pars[i], notifyonlyonrelease));
m_parcomps.back()->m_group_id = group_id;
if (group_id >= -1)
addAndMakeVisible(m_parcomps.back().get());
}
else
{
m_parcomps.push_back(nullptr);
}
} }
//addAndMakeVisible(&m_specvis); //addAndMakeVisible(&m_specvis);
@ -1446,7 +1453,8 @@ void RatioMixerEditor::resized()
void RatioMixerEditor::timerCallback() void RatioMixerEditor::timerCallback()
{ {
jassert(GetParameterValue != false); if (!GetParameterValue)
return;
for (int i = 0; i < m_ratio_level_sliders.size(); ++i) for (int i = 0; i < m_ratio_level_sliders.size(); ++i)
{ {
double v = GetParameterValue(0, i); double v = GetParameterValue(0, i);