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

Function ActivatePlayRegion

src/SelectUtilities.cpp:164–180  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

162}
163
164void 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
182void InactivatePlayRegion(AudacityProject &project)
183{

Callers 7

TogglePlayRegionFunction · 0.85
SetPlayRegionToSelectionFunction · 0.85
HandleQPReleaseMethod · 0.85
CancelMethod · 0.85
OnLoopMethod · 0.85
OnSetPlayRegionInFunction · 0.85
OnSetPlayRegionOutFunction · 0.85

Calls 5

GetFunction · 0.85
UpdateCheckmarksMethod · 0.80
SetActiveMethod · 0.45
EmptyMethod · 0.45
SetTimesMethod · 0.45

Tested by

no test coverage detected