MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / redo

Method redo

Engine/TrackerUndoCommand.cpp:63–86  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

61}
62
63void
64AddTrackCommand::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
88RemoveTracksCommand::RemoveTracksCommand(const std::list<TrackMarkerPtr> &markers,
89 const TrackerContextPtr& context)

Callers

nothing calls this directly

Calls 13

beginEditSelectionMethod · 0.80
insertMarkerMethod · 0.80
addTrackToSelectionMethod · 0.80
endEditSelectionMethod · 0.80
getNextMarkerMethod · 0.80
lockMethod · 0.45
clearSelectionMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
triggerAutoSaveMethod · 0.45
getAppMethod · 0.45
getNodeMethod · 0.45

Tested by

no test coverage detected