public override void Execute() { ManagedAudioMedia after = mHasAudioAfterDeleted ? mNode.SplitAudio(mSplitTimeEnd) : null; mNode.SplitAudio(mSplitTimeBegin); if (after != null) { mNode.MergeAudioWith(after); } View.Selection = mSelectionAfter; }
// Perform a split given a time and a node with no audio, optionally updating the selection in the view afterward. public static void Split(ProjectView.ProjectView view, PhraseNode node, PhraseNode nodeAfter, Time splitTime, bool updateSelection, bool allowSpecialRoleMarkForSurrounding) { nodeAfter.Audio = node.SplitAudio(splitTime); node.InsertAfterSelf(nodeAfter); if (allowSpecialRoleMarkForSurrounding) { AssignRole.AssignRoleToEmptyNodeSurroundedByCustomRoles(nodeAfter); } if (updateSelection) { view.SelectedBlockNode = nodeAfter; } view.UpdateBlocksLabelInStrip(node.AncestorAs <SectionNode>()); }