| 43 | } |
| 44 | |
| 45 | void |
| 46 | AddTrackCommand::undo() |
| 47 | { |
| 48 | boost::shared_ptr<TrackerContext> context = _context.lock(); |
| 49 | |
| 50 | if (!context) { |
| 51 | return; |
| 52 | } |
| 53 | |
| 54 | context->beginEditSelection(TrackerContext::eTrackSelectionInternal); |
| 55 | for (std::map<int, TrackMarkerPtr >::const_iterator it = _markers.begin(); it != _markers.end(); ++it) { |
| 56 | context->removeMarker(it->second); |
| 57 | } |
| 58 | context->endEditSelection(TrackerContext::eTrackSelectionInternal); |
| 59 | context->getNode()->getApp()->triggerAutoSave(); |
| 60 | } |
| 61 | |
| 62 | void |
| 63 | AddTrackCommand::redo() |
nothing calls this directly
no test coverage detected