Changeset 5791


Ignore:
Timestamp:
03/11/14 10:43:59 (6 years ago)
Author:
avneesh-singh
Message:

added option to delete subsequent phrases after recording is over

Location:
trunk/Obi/Obi
Files:
2 edited

Legend:

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

    r5790 r5791  
    30443044                isRecordingAtEnd = true; 
    30453045            //Console.WriteLine("recording index :" + listOfRecordedPhrases[listOfRecordedPhrases.Count - 1].Index + " : " + (mRecordingSection.PhraseChildCount-1)); 
     3046 
     3047            // delete the following phrases before going into more complex commands 
     3048            if (mView.ObiForm.Settings.Audio_DeleteFollowingPhrasesOfSectionAfterRecording && listOfRecordedPhrases.Count >0) 
     3049            { 
     3050                EmptyNode lastRecordedPhrase = listOfRecordedPhrases[listOfRecordedPhrases.Count - 1] ; 
     3051                SectionNode section = lastRecordedPhrase.ParentAs<SectionNode> () ; 
     3052                if ( lastRecordedPhrase.IsRooted && lastRecordedPhrase.Index < section.PhraseChildCount -1) 
     3053                { 
     3054                Command deleteFollowingCmd =  mView.GetDeleteRangeOfPhrasesInSectionCommand( 
     3055                    section, section.PhraseChild(lastRecordedPhrase.Index+1), section.PhraseChild(section.PhraseChildCount - 1)); 
     3056                mView.Presentation.Do(deleteFollowingCmd); 
     3057                } 
     3058            } 
     3059 
     3060            // on the fly phrase detection 
    30463061            if (mRecordingSession.PhraseMarksOnTheFly.Count > 0) 
    30473062            { 
     
    31063121            } 
    31073122            } 
     3123 
     3124             
    31083125            if (mView != null && mView.ObiForm.Settings.Project_SaveProjectWhenRecordingEnds) mView.ObiForm.Save(); 
    31093126        } 
  • trunk/Obi/Obi/Settings.cs

    r5757 r5791  
    103103        public bool Audio_UseRecordBtnToRecordOverSubsequentAudio; 
    104104        public bool Audio_EnforceSingleCursor; 
     105        public bool Audio_DeleteFollowingPhrasesOfSectionAfterRecording; // delete the following phrases in section when recording stops, it is attempt to minimize the delay while recording. 
    105106 
    106107        private static readonly string SETTINGS_FILE_NAME = "obi_settings.xml"; 
     
    193194            settings.Audio_UseRecordBtnToRecordOverSubsequentAudio = false; 
    194195            settings.Audio_EnforceSingleCursor = false; 
     196            settings.Audio_DeleteFollowingPhrasesOfSectionAfterRecording = false; 
    195197        } 
    196198 
Note: See TracChangeset for help on using the changeset viewer.