| 233 | } |
| 234 | |
| 235 | void MacroCommandDialog::SetCommandAndParams(const CommandID &Command, const wxString &Params) |
| 236 | { |
| 237 | auto iter = mCatalog.ByCommandId( Command ); |
| 238 | |
| 239 | mParameters->SetValue( Params ); |
| 240 | |
| 241 | mInternalCommandName = Command; |
| 242 | if (iter == mCatalog.end()) |
| 243 | // uh oh, using GET to expose an internal name to the user! |
| 244 | // in default of any better friendly name |
| 245 | mCommand->SetValue( Command.GET() ); |
| 246 | else { |
| 247 | mCommand->SetValue( iter->name.StrippedTranslation() ); |
| 248 | // using GET to expose a CommandID to the user! |
| 249 | // Macro command details are one place that we do expose Identifier |
| 250 | // to (more sophisticated) users |
| 251 | mDetails->SetValue( |
| 252 | iter->name.Internal() + "\r\n" + iter->category.Translation() ); |
| 253 | mChoices->SetItemState(iter - mCatalog.begin(), |
| 254 | wxLIST_STATE_SELECTED, wxLIST_STATE_SELECTED); |
| 255 | |
| 256 | PluginID ID = PluginManager::Get().GetByCommandIdentifier(Command); |
| 257 | |
| 258 | // If ID is empty, then the effect wasn't found, in which case, the user must have |
| 259 | // selected one of the "special" commands. |
| 260 | mEditParams->Enable(!ID.empty()); |
| 261 | mUsePreset->Enable(EffectManager::Get().HasPresets(ID)); |
| 262 | } |
| 263 | } |
nothing calls this directly
no test coverage detected