1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-06 06:38:49 +02:00

Fix Bug 375 (P3): Can now drag a clip to a new track, even if it is the selection.

This commit is contained in:
james.k.crook@gmail.com 2012-05-05 15:27:51 +00:00
parent 30a7876593
commit 5a8a515235

View File

@ -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;