From 5f49892d61fdcd956309256f3e2cb5bee180dd9f Mon Sep 17 00:00:00 2001 From: David Bailes Date: Thu, 13 Jul 2017 16:31:06 +0100 Subject: [PATCH] Keyboard commands for moving clips: minor fix Problem: the commands did not take into account that for a stereo track, the clip boundaries in the two channels can be different. Fixed. --- src/Menus.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/Menus.cpp b/src/Menus.cpp index 148d6adff..22793a97f 100644 --- a/src/Menus.cpp +++ b/src/Menus.cpp @@ -3390,6 +3390,12 @@ double AudacityProject::OnClipMove auto t0 = viewInfo.selectedRegion.t0(); state.capturedClip = wt->GetClipAtTime( t0 ); + if (state.capturedClip == nullptr && track->GetLinked() && track->GetLink()) { + // the clips in the right channel may be different from the left + track = track->GetLink(); + wt = static_cast(track); + state.capturedClip = wt->GetClipAtTime(t0); + } if (state.capturedClip == nullptr) return 0.0;