MCPcopy Create free account
hub / github.com/audacity/audacity / SelectRangeOfTracks

Method SelectRangeOfTracks

libraries/lib-track-selection/SelectionState.cpp:78–94  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

76}
77
78void SelectionState::SelectRangeOfTracks(
79 TrackList &tracks, Track &rsTrack, Track &reTrack)
80{
81 Track *sTrack = &rsTrack, *eTrack = &reTrack;
82 // Swap the track pointers if needed
83 auto begin = tracks.begin(),
84 iterS = tracks.Find(sTrack),
85 iterE = tracks.Find(eTrack);
86 auto indS = std::distance(begin, iterS),
87 indE = std::distance(begin, iterE);
88 if (indE < indS)
89 std::swap(sTrack, eTrack);
90
91 for (auto track :
92 tracks.Any().StartingWith(sTrack).EndingAfter(eTrack))
93 SelectTrack(*track, true, false);
94}
95
96void SelectionState::SelectNone(TrackList &tracks)
97{

Callers 1

DragMethod · 0.80

Calls 6

EndingAfterMethod · 0.80
StartingWithMethod · 0.80
swapFunction · 0.50
beginMethod · 0.45
FindMethod · 0.45
AnyMethod · 0.45

Tested by

no test coverage detected