| 94 | } |
| 95 | |
| 96 | int TrackFocus::TrackNum(const std::shared_ptr<Track> &target) const |
| 97 | { |
| 98 | // Find 1-based position of the target in the visible tracks, or 0 if not |
| 99 | // found |
| 100 | int ndx = 0; |
| 101 | |
| 102 | for (auto t : GetTracks()) { |
| 103 | ndx++; |
| 104 | if( t == target.get() ) |
| 105 | { |
| 106 | return ndx; |
| 107 | } |
| 108 | } |
| 109 | |
| 110 | return 0; |
| 111 | } |
| 112 | |
| 113 | std::shared_ptr<Track> TrackFocus::FindTrack(int num) const |
| 114 | { |
no test coverage detected