| 464 | } |
| 465 | |
| 466 | void OnDeleteLabels(const CommandContext &context) |
| 467 | { |
| 468 | auto &project = context.project; |
| 469 | auto &tracks = TrackList::Get(project); |
| 470 | auto &selectedRegion = ViewInfo::Get(project).selectedRegion; |
| 471 | |
| 472 | if (selectedRegion.isPoint()) |
| 473 | return; |
| 474 | |
| 475 | auto editfunc = [&](Track &track, double t0, double t1) { |
| 476 | track.TypeSwitch( [&](Track &t) { t.Clear(t0, t1); } ); |
| 477 | }; |
| 478 | EditByLabel(project, tracks, selectedRegion, editfunc); |
| 479 | |
| 480 | selectedRegion.collapseToT0(); |
| 481 | |
| 482 | ProjectHistory::Get(project).PushState( |
| 483 | /* i18n-hint: (verb) Audacity has just deleted the labeled audio regions*/ |
| 484 | XO("Deleted labeled audio regions"), |
| 485 | /* i18n-hint: (verb)*/ |
| 486 | XO("Delete Labeled Audio")); |
| 487 | } |
| 488 | |
| 489 | void OnSplitCutLabels(const CommandContext &context) |
| 490 | { |
nothing calls this directly
no test coverage detected