1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-10 09:01:13 +02:00

More constructor arguments for EffectScienFilter

This commit is contained in:
Paul Licameli 2017-11-03 09:13:06 -04:00
parent aa72cae61b
commit 97a8cf52d4
2 changed files with 10 additions and 4 deletions

View File

@ -395,8 +395,10 @@ void EffectScienFilter::PopulateOrExchange(ShuttleGui & S)
}
S.EndVerticalLay();
mPanel = safenew EffectScienFilterPanel(parent, wxID_ANY, this);
mPanel->SetFreqRange(mLoFreq, mNyquist);
mPanel = safenew EffectScienFilterPanel(
parent, wxID_ANY,
this, mLoFreq, mNyquist
);
S.SetBorder(5);
S.Prop(1);
@ -1011,7 +1013,8 @@ BEGIN_EVENT_TABLE(EffectScienFilterPanel, wxPanelWrapper)
END_EVENT_TABLE()
EffectScienFilterPanel::EffectScienFilterPanel(
wxWindow *parent, wxWindowID winid, EffectScienFilter *effect)
wxWindow *parent, wxWindowID winid,
EffectScienFilter *effect, double lo, double hi)
: wxPanelWrapper(parent, winid, wxDefaultPosition, wxSize(400, 200))
{
mEffect = effect;
@ -1024,6 +1027,8 @@ EffectScienFilterPanel::EffectScienFilterPanel(
mHiFreq = 0.0;
mDbMin = 0.0;
mDbMax = 0.0;
SetFreqRange(lo, hi);
}
EffectScienFilterPanel::~EffectScienFilterPanel()

View File

@ -140,7 +140,8 @@ class EffectScienFilterPanel final : public wxPanelWrapper
{
public:
EffectScienFilterPanel(
wxWindow *parent, wxWindowID winid, EffectScienFilter *effect);
wxWindow *parent, wxWindowID winid,
EffectScienFilter *effect, double lo, double hi);
virtual ~EffectScienFilterPanel();
// We don't need or want to accept focus.