From: <ju...@us...> - 2008-05-16 19:02:10
|
Revision: 3078 http://urakawa.svn.sourceforge.net/urakawa/?rev=3078&view=rev Author: julienq Date: 2008-05-16 12:02:00 -0700 (Fri, 16 May 2008) Log Message: ----------- Fix for scroll selection into view bug, and more importantly for bug 1964797: while recording next phrase after next section crash Modified Paths: -------------- trunk/urakawa/application/Obi/Obi/Commands/Node/SplitAudio.cs trunk/urakawa/application/Obi/Obi/Playlist.cs trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs trunk/urakawa/application/Obi/Obi/ProjectView/StripsView.cs trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs Modified: trunk/urakawa/application/Obi/Obi/Commands/Node/SplitAudio.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/Commands/Node/SplitAudio.cs 2008-05-16 16:44:30 UTC (rev 3077) +++ trunk/urakawa/application/Obi/Obi/Commands/Node/SplitAudio.cs 2008-05-16 19:02:00 UTC (rev 3078) @@ -24,6 +24,9 @@ public override void execute() { mNewNode = View.Presentation.CreatePhraseNode(mNode.SplitAudio(mSplitPoint)); + mNewNode.CustomClass = mNode.CustomClass; + mNewNode.NodeKind = mNode.NodeKind; + mNewNode.Used = mNode.Used; mNode.InsertAfterSelf(mNewNode); if (UpdateSelection) View.SelectedBlockNode = mNewNode; } Modified: trunk/urakawa/application/Obi/Obi/Playlist.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/Playlist.cs 2008-05-16 16:44:30 UTC (rev 3077) +++ trunk/urakawa/application/Obi/Obi/Playlist.cs 2008-05-16 19:02:00 UTC (rev 3078) @@ -95,7 +95,7 @@ /// </summary> public AudioPlayer Audioplayer { get { return mPlayer; } } - public bool CanNavigatePrevPhrase { get { return mCurrentPhraseIndex > 0; } } + public bool CanNavigatePrevPhrase { get { return true; } } public bool CanNavigateNextPhrase { get { return mCurrentPhraseIndex < mPhrases.Count - 1; } } public bool CanNavigateNextSection { get { return NextSectionIndex < mPhrases.Count - 1; } } public bool CanNavigateNextPage { get { return true; } } Modified: trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs 2008-05-16 16:44:30 UTC (rev 3077) +++ trunk/urakawa/application/Obi/Obi/ProjectView/ProjectView.cs 2008-05-16 19:02:00 UTC (rev 3078) @@ -604,13 +604,13 @@ } // select in the control mSelection = value; + UpdateShowOnlySelected(mSelection == null ? false : mShowOnlySelected); if (mSelection != null) { if (mSelection.Control == mTOCView) TOCViewVisible = true; else if (mSelection.Control == mMetadataView) MetadataViewVisible = true; mSelection.Control.Selection = value; } - UpdateShowOnlySelected(mSelection == null ? false : mShowOnlySelected); if (SelectionChanged != null) SelectionChanged(this, new EventArgs()); } } @@ -993,7 +993,7 @@ public void SplitPhrase() { - if (CanSplitPhrase) mPresentation.getUndoRedoManager().execute(new Commands.Node.SplitAudio(this)); + if (CanSplitPhrase) { mPresentation.getUndoRedoManager().execute(new Commands.Node.SplitAudio(this)); } } /// <summary> Modified: trunk/urakawa/application/Obi/Obi/ProjectView/StripsView.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/StripsView.cs 2008-05-16 16:44:30 UTC (rev 3077) +++ trunk/urakawa/application/Obi/Obi/ProjectView/StripsView.cs 2008-05-16 19:02:00 UTC (rev 3078) @@ -270,10 +270,10 @@ if (s != null) { s.SelectionFromView = mSelection; - mLayoutPanel.ScrollControlIntoView((Control)s); SectionNode section = value.Node is SectionNode ? (SectionNode)value.Node : value.Node.ParentAs<SectionNode>(); mView.MakeTreeNodeVisibleForSection(section); + mLayoutPanel.ScrollControlIntoView((Control)s); mFocusing = true; if (!((Control)s).Focused) ((Control)s).Focus(); mFocusing = false; Modified: trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs =================================================================== --- trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-05-16 16:44:30 UTC (rev 3077) +++ trunk/urakawa/application/Obi/Obi/ProjectView/TransportBar.cs 2008-05-16 19:02:00 UTC (rev 3078) @@ -851,8 +851,10 @@ mRecordingPhrase = phrase; if (e.PhraseIndex > 0) { - mView.Presentation.getUndoRedoManager().execute(new Commands.Node.AddNode(mView, phrase, mRecordingSection, - mRecordingInitPhraseIndex + e.PhraseIndex)); + Commands.Node.AddNode add = new Commands.Node.AddNode(mView, phrase, mRecordingSection, + mRecordingInitPhraseIndex + e.PhraseIndex); + add.UpdateSelection = false; + mView.Presentation.getUndoRedoManager().execute(add); } else { This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |