Apply macro, given its ID. Does nothing if not found, rather than returning an error.
| 253 | // Apply macro, given its ID. |
| 254 | // Does nothing if not found, rather than returning an error. |
| 255 | void ApplyMacroDialog::ApplyMacroToProject( const CommandID & MacroID, bool bHasGui ) |
| 256 | { |
| 257 | for( int i=0;i<mMacros->GetItemCount();i++){ |
| 258 | wxString name = mMacros->GetItemText(i); |
| 259 | if( MacroIdOfName( name ) == MacroID ){ |
| 260 | ApplyMacroToProject( i, bHasGui ); |
| 261 | return; |
| 262 | } |
| 263 | } |
| 264 | } |
| 265 | |
| 266 | // Apply macro, given its number in the list. |
| 267 | void ApplyMacroDialog::ApplyMacroToProject( int iMacro, bool bHasGui ) |
no test coverage detected