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

Function FindCandidates

src/tracks/ui/TimeShiftHandle.cpp:437–454  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435
436namespace {
437SnapPointArray FindCandidates(
438 const TrackList &tracks, const ClipMoveState::ShifterMap &shifters)
439{
440 // Compare with the other function FindCandidates in Snap
441 // Make the snap manager more selective than it would be if just constructed
442 // from the track list
443 SnapPointArray candidates;
444 for (const auto &pair : shifters) {
445 auto &shifter = pair.second;
446 auto &track = shifter->GetTrack();
447 for (const auto &interval : shifter->FixedIntervals()) {
448 candidates.emplace_back(interval->Start(), &track);
449 if (interval->Start() != interval->End())
450 candidates.emplace_back(interval->End(), &track);
451 }
452 }
453 return candidates;
454}
455}
456
457UIHandle::Result TimeShiftHandle::Click(

Callers 1

ClickMethod · 0.70

Calls 3

GetTrackMethod · 0.45
StartMethod · 0.45
EndMethod · 0.45

Tested by

no test coverage detected