This function is used only in the macro programming user interface
| 173 | |
| 174 | // This function is used only in the macro programming user interface |
| 175 | wxString EffectManager::GetDefaultPreset(const PluginID & ID) |
| 176 | { |
| 177 | auto effect = GetEffect(ID); |
| 178 | |
| 179 | if (!effect) |
| 180 | { |
| 181 | return wxEmptyString; |
| 182 | } |
| 183 | |
| 184 | wxString preset; |
| 185 | if (HasCurrentSettings(*effect)) |
| 186 | { |
| 187 | preset = EffectPlugin::kCurrentSettingsIdent; |
| 188 | } |
| 189 | else if (HasFactoryDefaults(*effect)) |
| 190 | { |
| 191 | preset = EffectPlugin::kFactoryDefaultsIdent; |
| 192 | } |
| 193 | |
| 194 | if (!preset.empty()) |
| 195 | { |
| 196 | CommandParameters eap; |
| 197 | |
| 198 | eap.Write(wxT("Use Preset"), preset); |
| 199 | eap.GetParameters(preset); |
| 200 | } |
| 201 | |
| 202 | return preset; |
| 203 | } |
| 204 | |
| 205 | EffectPlugin* EffectManager::GetEffect(const PluginID& ID) |
| 206 | { |
no test coverage detected