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

Function OnSplitDelete

src/menus/EditMenus.cpp:803–823  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

801}
802
803void 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
825void OnSilence(const CommandContext &context)
826{

Callers

nothing calls this directly

Calls 6

GetFunction · 0.85
VisitMethod · 0.45
SplitDeleteMethod · 0.45
SupportsBasicEditingMethod · 0.45
SilenceMethod · 0.45
PushStateMethod · 0.45

Tested by

no test coverage detected