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