MCPcopy Create free account
hub / github.com/audacity/audacity / OnClose

Method OnClose

src/effects/VST3/VST3Editor.cpp:152–184  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

150}
151
152void VST3Editor::OnClose()
153{
154 using namespace Steinberg;
155
156 mParent->PopEventHandler();
157
158 mPlainUI = nullptr;
159 mParent = nullptr;
160 if(mPlugView)
161 {
162 mPlugView->setFrame(nullptr);
163 mPlugView->removed();
164 mPlugView = nullptr;
165 mPlugFrame = nullptr;
166 }
167
168 mWrapper.EndParameterEdit();
169
170 mAccess.ModifySettings([&](EffectSettings &settings){
171 if (mDuration != nullptr)
172 settings.extra.SetDuration(mDuration->GetValue());
173 //Flush changes if there is no processing performed at the moment
174 mWrapper.FlushParameters(settings);
175 mWrapper.StoreSettings(settings);
176 return nullptr;
177 });
178 //Make sure that new state has been written to the caches...
179 mAccess.Flush();
180
181 mWrapper.ParamChangedHandler = {};
182
183 EffectEditor::OnClose();
184}
185
186bool VST3Editor::UpdateUI()
187{

Callers

nothing calls this directly

Calls 6

EndParameterEditMethod · 0.80
FlushParametersMethod · 0.80
OnCloseFunction · 0.50
GetValueMethod · 0.45
StoreSettingsMethod · 0.45
FlushMethod · 0.45

Tested by

no test coverage detected