From 5a8a51523579fed555773b84980a5e463f00c387 Mon Sep 17 00:00:00 2001 From: "james.k.crook@gmail.com" Date: Sat, 5 May 2012 15:27:51 +0000 Subject: [PATCH] Fix Bug 375 (P3): Can now drag a clip to a new track, even if it is the selection. --- src/TrackPanel.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index f0d178af1..61faa6b3b 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -2945,8 +2945,8 @@ void TrackPanel::DoSlide(wxMouseEvent & event) //If the mouse is over a track that isn't the captured track, //drag the clip to the mousetrack - if (mCapturedClip && mouseTrack != mCapturedTrack && - !mCapturedClipIsSelection) + if (mCapturedClip && mouseTrack != mCapturedTrack /*&& + !mCapturedClipIsSelection*/) { // Make sure we always have the first linked track of a stereo track if (!mouseTrack->GetLinked() && mTracks->GetLink(mouseTrack)) @@ -2963,6 +2963,12 @@ void TrackPanel::DoSlide(wxMouseEvent & event) mCapturedTrack = mouseTrack; mDidSlideVertically = true; + if (mCapturedClipIsSelection) { + // Slide the selection, too + mViewInfo->sel0 += desiredSlideAmount; + mViewInfo->sel1 += desiredSlideAmount; + } + // Make the offset permanent; start from a "clean slate" mHSlideAmount = 0.0; desiredSlideAmount = 0.0;