This function selects all tracks if no tracks selected, and all time if no time selected. There is an argument for making it just count wave tracks, However you could then not select a label and cut it, without this function selecting all tracks.
| 150 | // However you could then not select a label and cut it, |
| 151 | // without this function selecting all tracks. |
| 152 | void DoSelectSomething(AudacityProject &project) |
| 153 | { |
| 154 | auto &tracks = TrackList::Get( project ); |
| 155 | auto &selectedRegion = ViewInfo::Get( project ).selectedRegion; |
| 156 | |
| 157 | bool bTime = selectedRegion.isPoint(); |
| 158 | bool bTracks = tracks.Selected().empty(); |
| 159 | |
| 160 | if (bTime || bTracks) |
| 161 | DoSelectTimeAndTracks(project, bTime, bTracks); |
| 162 | } |
| 163 | |
| 164 | void ActivatePlayRegion(AudacityProject &project) |
| 165 | { |
nothing calls this directly
no test coverage detected