| 61 | } |
| 62 | |
| 63 | void |
| 64 | AddTrackCommand::redo() |
| 65 | { |
| 66 | TrackerContextPtr context = _context.lock(); |
| 67 | |
| 68 | if (!context) { |
| 69 | return; |
| 70 | } |
| 71 | context->beginEditSelection(TrackerContext::eTrackSelectionInternal); |
| 72 | context->clearSelection(TrackerContext::eTrackSelectionInternal); |
| 73 | |
| 74 | if (!_isFirstRedo) { |
| 75 | for (std::map<int, TrackMarkerPtr>::const_iterator it = _markers.begin(); it != _markers.end(); ++it) { |
| 76 | context->insertMarker(it->second, it->first); |
| 77 | } |
| 78 | } |
| 79 | for (std::map<int, TrackMarkerPtr>::const_iterator it = _markers.begin(); it != _markers.end(); ++it) { |
| 80 | context->addTrackToSelection(it->second, TrackerContext::eTrackSelectionInternal); |
| 81 | } |
| 82 | |
| 83 | context->endEditSelection(TrackerContext::eTrackSelectionInternal); |
| 84 | context->getNode()->getApp()->triggerAutoSave(); |
| 85 | _isFirstRedo = false; |
| 86 | } |
| 87 | |
| 88 | RemoveTracksCommand::RemoveTracksCommand(const std::list<TrackMarkerPtr> &markers, |
| 89 | const TrackerContextPtr& context) |
nothing calls this directly
no test coverage detected