| 150 | } |
| 151 | |
| 152 | void 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 | |
| 186 | bool VST3Editor::UpdateUI() |
| 187 | { |
nothing calls this directly
no test coverage detected