| 435 | |
| 436 | namespace { |
| 437 | SnapPointArray 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 | |
| 457 | UIHandle::Result TimeShiftHandle::Click( |