| 522 | } |
| 523 | |
| 524 | void 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 | |
| 550 | void ConversationEditor::onMoveUpCommand(wxCommandEvent& ev) |
| 551 | { |
nothing calls this directly
no test coverage detected