| 162 | } |
| 163 | |
| 164 | void ActivatePlayRegion(AudacityProject &project) |
| 165 | { |
| 166 | auto &viewInfo = ViewInfo::Get( project ); |
| 167 | auto &playRegion = viewInfo.playRegion; |
| 168 | playRegion.SetActive( true ); |
| 169 | if (playRegion.Empty()) { |
| 170 | auto &selectedRegion = viewInfo.selectedRegion; |
| 171 | if (!selectedRegion.isPoint()) |
| 172 | playRegion.SetTimes(selectedRegion.t0(), selectedRegion.t1()); |
| 173 | else |
| 174 | // Arbitrary first four seconds |
| 175 | playRegion.SetTimes(0.0, 4.0); |
| 176 | } |
| 177 | |
| 178 | // Ensure the proper state of looping in the menu |
| 179 | CommandManager::Get(project).UpdateCheckmarks(); |
| 180 | } |
| 181 | |
| 182 | void InactivatePlayRegion(AudacityProject &project) |
| 183 | { |
no test coverage detected