Changeset 5821


Ignore:
Timestamp:
03/24/14 06:27:05 (6 years ago)
Author:
rohit_tandon
Message:

Pause state is retained when Elapse back is used on the first phrase of the section.

File:
1 edited

Legend:

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

    r5818 r5821  
    25782578            if (IsPlayerActive) 
    25792579            { 
    2580                if (IsPaused && mCurrentPlaylist.CurrentTimeInAsset<=10 && !mView.IsZoomWaveformActive) 
    2581                 {                
     2580                if (IsPaused && mCurrentPlaylist.CurrentTimeInAsset <= 10 && (mView.Selection.Node.PrecedingNode is PhraseNode || mView.Selection.Node.PrecedingNode is EmptyNode) && !mView.IsZoomWaveformActive) 
     2581                { 
    25822582                    LapseBackCursor(); 
    25832583                    return true; 
     
    25932593                } 
    25942594            } 
    2595             else if (CurrentState == State.Stopped &&  mView.Selection != null && mView.Selection.Node is PhraseNode) 
     2595            else if (CurrentState == State.Stopped && mView.Selection != null && mView.Selection.Node is PhraseNode) 
    25962596            { 
    25972597                LapseBackCursor(); 
     
    26032603        private void LapseBackCursor() 
    26042604        { 
     2605            if (IsPaused) 
     2606            { 
     2607                double time = mCurrentPlaylist.CurrentTimeInAsset; 
     2608                
     2609                if (mView.Selection.Node.PrecedingNode != null && mView.Selection.Node.PrecedingNode is PhraseNode) 
     2610                { 
     2611                    Stop(); 
     2612                   // mView.ClearCursor(); 
     2613                    mView.Selection = new NodeSelection(mView.Selection.Node.PrecedingNode, mView.Selection.Control); 
     2614 
     2615                    AudioRange range = new AudioRange(mView.Selection.Node.Duration); 
     2616                    mView.Selection = new AudioSelection((PhraseNode)mView.Selection.Node, mView.Selection.Control, range); 
     2617                } 
     2618            } 
    26052619            if (mView.Selection is AudioSelection) 
    26062620            { 
    26072621                double time = ((AudioSelection)mView.Selection).AudioRange.CursorTime; 
    2608                 if (IsPaused) 
    2609                 { 
    2610                     time = mCurrentPlaylist.CurrentTimeInAsset; 
    2611                     Stop(); 
    2612                 } 
     2622 
    26132623                if (time < 1 && !mView.IsZoomWaveformActive && ((mView.Selection.Node.PrecedingNode is PhraseNode) || (mView.Selection.Node.PrecedingNode is EmptyNode))) 
    26142624                { 
     
    26312641                    new AudioRange(time)); 
    26322642            } 
    2633             else 
     2643            else if(!IsPaused) 
    26342644            { 
    26352645                mView.Selection = new AudioSelection((PhraseNode)mView.Selection.Node, mView.Selection.Control, 
Note: See TracChangeset for help on using the changeset viewer.