MCPcopy Create free account
hub / github.com/codereader/DarkRadiant / onEditCommand

Method onEditCommand

plugins/dm.conversation/ConversationEditor.cpp:524–548  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

522}
523
524void ConversationEditor::onEditCommand(wxCommandEvent& ev)
525{
526 // Get the index of the currently selected command
527 wxutil::TreeModel::Row row(_currentCommand, *_commandStore);
528 int index = row[_commandColumns.cmdNumber].getInteger();
529
530 // Try to look up the command in the conversation
531 conversation::Conversation::CommandMap::iterator i = _conversation.commands.find(index);
532
533 if (i != _conversation.commands.end())
534 {
535 // Get the command reference
536 conversation::ConversationCommandPtr command = i->second;
537
538 // Construct a command editor (blocks on construction)
539 CommandEditor* editor = new CommandEditor(this, *command, _conversation);
540
541 if (editor->ShowModal() == wxID_OK)
542 {
543 updateWidgets();
544 }
545
546 editor->Destroy();
547 }
548}
549
550void ConversationEditor::onMoveUpCommand(wxCommandEvent& ev)
551{

Callers

nothing calls this directly

Calls 5

getIntegerMethod · 0.80
findMethod · 0.45
endMethod · 0.45
ShowModalMethod · 0.45
DestroyMethod · 0.45

Tested by

no test coverage detected