Skip to content
Snippets Groups Projects
Commit 8a42aecb authored by jsiegle's avatar jsiegle
Browse files

Allow filter paramters to be restored when the number of inputs to FilterNode changes

parent 9a3c3230
Branches
Tags
No related merge requests found
......@@ -153,10 +153,22 @@ void FilterNode::updateSettings()
//p2.setValue(6000.0f, n);
// restore defaults
lowCuts.add(defaultLowCut);
highCuts.add(defaultHighCut);
setFilterParameters(defaultLowCut, defaultHighCut, n);
float lc, hc;
if (lowCuts.size() > n)
{
lc = lowCuts[n];
hc = highCuts[n];
} else {
lc = defaultLowCut;
hc = defaultHighCut;
}
lowCuts.add(lc);
highCuts.add(hc);
setFilterParameters(lc, hc, n);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment