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

Method OnSelectAll

src/menus/SelectMenus.cpp:438–462  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436{
437
438void OnSelectAll(const CommandContext &context)
439{
440 auto& trackPanel = TrackPanel::Get(context.project);
441 auto& tracks = TrackList::Get(context.project);
442
443 for (auto lt : tracks.Selected<LabelTrack>()) {
444 auto& view = LabelTrackView::Get(*lt);
445 if (view.SelectAllText(context.project)) {
446 trackPanel.Refresh(false);
447 return;
448 }
449 }
450
451 //Presumably, there might be not more than one track
452 //that expects text input
453 for (auto wt : tracks.Any<WaveTrack>()) {
454 auto& view = WaveChannelView::GetFirst(*wt);
455 if (view.SelectAllText(context.project)) {
456 trackPanel.Refresh(false);
457 return;
458 }
459 }
460
461 SelectUtilities::DoSelectAll( context.project );
462}
463
464void OnSelectNone(const CommandContext &context)
465{

Callers

nothing calls this directly

Calls 4

GetFunction · 0.85
DoSelectAllFunction · 0.85
SelectAllTextMethod · 0.45
RefreshMethod · 0.45

Tested by

no test coverage detected