Changeset 5870


Ignore:
Timestamp:
04/08/14 10:34:52 (6 years ago)
Author:
avneesh-singh
Message:

in preview before recording, the subsequent phrases are removed before starting recording

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Obi/Obi/ProjectView/TransportBar.cs

    r5869 r5870  
    31343134               && ((CurrentState == State.Paused && !(mView.Selection is AudioSelection)) || (mView.Selection != null && mView.Selection is AudioSelection && ((AudioSelection)mView.Selection).AudioRange.HasCursor))) 
    31353135            { 
    3136                  
     3136                // first delete the subsequent phrases in the section 
     3137                try 
     3138                { 
     3139                    EmptyNode selectedNode = mView.Selection != null && mView.Selection.Node is EmptyNode ? (EmptyNode)mView.Selection.Node : null; 
     3140                    NodeSelection currentSelection = mView.Selection; 
     3141                    if (selectedNode != null && selectedNode is   PhraseNode && selectedNode.Index < selectedNode.ParentAs<SectionNode>().PhraseChildCount - 1) 
     3142                    { 
     3143                        double time = mCurrentPlaylist.CurrentTime; 
     3144                        SectionNode section = selectedNode.ParentAs<SectionNode>(); 
     3145                        Command deleteFollowingCmd = mView.GetDeleteRangeOfPhrasesInSectionCommand( 
     3146                            section, section.PhraseChild(selectedNode.Index + 1), section.PhraseChild(section.PhraseChildCount - 1)); 
     3147                        mView.Presentation.Do(deleteFollowingCmd); 
     3148                        mView.Selection = new AudioSelection((PhraseNode) selectedNode, currentSelection.Control,  
     3149                            new AudioRange(time)); 
     3150                    } 
     3151                } 
     3152                catch (System.Exception ex) 
     3153                { 
     3154                    mView.WriteToLogFile(ex.ToString()); 
     3155                    MessageBox.Show(ex.ToString()); 
     3156                } 
    31373157                m_PreviewBeforeRecordingWorker = new System.ComponentModel.BackgroundWorker(); 
    31383158                m_PreviewBeforeRecordingWorker.DoWork += new System.ComponentModel.DoWorkEventHandler(delegate(object sender, System.ComponentModel.DoWorkEventArgs e) 
     
    31563176                    { 
    31573177                        if (mResumeRecordingPhrase != null) mResumeRecordingPhrase = null; 
    3158                         StartRecordingDirectly_Internal(false); 
     3178                        StartRecordingDirectly_Internal(true); 
    31593179                    } 
    31603180                }); 
Note: See TracChangeset for help on using the changeset viewer.