| 801 | } |
| 802 | |
| 803 | void OnSplitDelete(const CommandContext &context) |
| 804 | { |
| 805 | auto &project = context.project; |
| 806 | auto &tracks = TrackList::Get(project); |
| 807 | auto &selectedRegion = ViewInfo::Get(project).selectedRegion; |
| 808 | |
| 809 | tracks.Selected().Visit( |
| 810 | [&](WaveTrack &wt) { |
| 811 | wt.SplitDelete(selectedRegion.t0(), selectedRegion.t1()); |
| 812 | }, |
| 813 | [&](Track &n) { |
| 814 | if (n.SupportsBasicEditing()) |
| 815 | n.Silence(selectedRegion.t0(), selectedRegion.t1()); |
| 816 | } |
| 817 | ); |
| 818 | |
| 819 | ProjectHistory::Get(project).PushState( |
| 820 | XO("Split-deleted %.2f seconds at t=%.2f") |
| 821 | .Format(selectedRegion.duration(), selectedRegion.t0()), |
| 822 | XO("Split Delete")); |
| 823 | } |
| 824 | |
| 825 | void OnSilence(const CommandContext &context) |
| 826 | { |
nothing calls this directly
no test coverage detected