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

Method TrackNum

libraries/lib-track-selection/TrackFocus.cpp:96–111  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

94}
95
96int 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
113std::shared_ptr<Track> TrackFocus::FindTrack(int num) const
114{

Callers 6

BeginChangeFocusMethod · 0.80
UpdatedMethod · 0.80
GetNameMethod · 0.80
GetValueMethod · 0.80
GetFocusMethod · 0.80

Calls 2

GetTracksFunction · 0.85
getMethod · 0.45

Tested by

no test coverage detected