Changeset 5875


Ignore:
Timestamp:
04/08/14 13:09:47 (6 years ago)
Author:
avneesh-singh
Message:

preview before recording also works well with selection

File:
1 edited

Legend:

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

    r5874 r5875  
    31473147                    if (selectedNode != null && selectedNode is   PhraseNode && selectedNode.Index < selectedNode.ParentAs<SectionNode>().PhraseChildCount - 1) 
    31483148                    { 
    3149                         double time = mCurrentPlaylist.CurrentTime; 
     3149                        double time =IsPlayerActive? mCurrentPlaylist.CurrentTime: 
     3150                            mView.Selection is AudioSelection? 
     3151                            ( ((AudioSelection)mView.Selection).AudioRange.HasCursor? ((AudioSelection)mView.Selection).AudioRange.CursorTime: ((AudioSelection)mView.Selection).AudioRange.SelectionBeginTime): 
     3152                            -1; 
    31503153                        SectionNode section = selectedNode.ParentAs<SectionNode>(); 
    31513154                        Command deleteFollowingCmd = mView.GetDeleteRangeOfPhrasesInSectionCommand( 
    31523155                            section, section.PhraseChild(selectedNode.Index + 1), section.PhraseChild(section.PhraseChildCount - 1)); 
    31533156                        mView.Presentation.Do(deleteFollowingCmd); 
    3154                         mView.Selection = new AudioSelection((PhraseNode) selectedNode, currentSelection.Control,  
    3155                             new AudioRange(time)); 
     3157 
     3158                        if (time >= 0) 
     3159                        { 
     3160                            mView.Selection = new AudioSelection((PhraseNode)selectedNode, currentSelection.Control, 
     3161                               new AudioRange(time)); 
     3162                        } 
    31563163                    } 
    31573164                } 
Note: See TracChangeset for help on using the changeset viewer.