From: <avn...@us...> - 2008-06-02 08:05:21
|
Revision: 3104 http://urakawa.svn.sourceforge.net/urakawa/?rev=3104&view=rev Author: avneeshsingh Date: 2008-06-02 01:05:18 -0700 (Mon, 02 Jun 2008) Log Message: ----------- While playback is on, toggle views (F6) lands to playing phrase in contents view. Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs 2008-05-30 15:20:00 UTC (rev 3103) +++ trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs 2008-06-02 08:05:18 UTC (rev 3104) @@ -375,7 +375,13 @@ { if (CanFocusOnContentView) { - if (mSelection != null && mSelection.Control is TOCView) Selection = new NodeSelection(mSelection.Node, mStripsView); + if (mSelection != null && mSelection.Control is TOCView) + { +if ( TransportBar.IsPlayerActive ) + Selection = new NodeSelection(mStripsView.PlaybackPhrase , mStripsView); + else + Selection = new NodeSelection(mSelection.Node, mStripsView); + } mStripsView.Focus(); } } Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-05-30 15:20:00 UTC (rev 3103) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-06-02 08:05:18 UTC (rev 3104) @@ -1703,13 +1703,13 @@ if (PNode != null && mCurrentPlaylist.ContainsPhrase(PNode)) { - if (PNode != mCurrentPlaylist.CurrentPhrase) // if selected node is not currently playing phrase - { + if (PNode != mCurrentPlaylist.CurrentPhrase ) // if selected node is not currently playing phrase + { if (mPlayer.State == Obi.Audio.AudioPlayerState.Paused) mCurrentPlaylist.Stop(); mCurrentPlaylist.CurrentPhrase = PNode; - mCurrentPlaylist.CurrentTimeInAsset = ((AudioSelection)mView.Selection).AudioRange.CursorTime; - } + if (mView.Selection is AudioSelection ) mCurrentPlaylist.CurrentTimeInAsset = ((AudioSelection)mView.Selection).AudioRange.CursorTime; + } else if (mView.Selection is AudioSelection && ((AudioSelection)mView.Selection).AudioRange.HasCursor) // clicked on the same phrase mCurrentPlaylist.CurrentTimeInAsset = ((AudioSelection)mView.Selection).AudioRange.CursorTime; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |