diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index ec0eded34..85d81b5e1 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -3329,6 +3329,20 @@ void TrackPanel::HandleSlide(wxMouseEvent & event) DoSlide(event); if (event.LeftUp()) { + + SetCapturedTrack( NULL ); + + mSnapManager.reset(); + + // Do not draw yellow lines + if (mSnapLeft != -1 || mSnapRight != -1) { + mSnapLeft = mSnapRight = -1; + Refresh(false); + } + + if (!mDidSlideVertically && mHSlideAmount==0) + return; + for (size_t i = 0; i < mCapturedClipArray.size(); i++) { TrackClip &trackClip = mCapturedClipArray[i]; @@ -3349,19 +3363,6 @@ void TrackPanel::HandleSlide(wxMouseEvent & event) } } - SetCapturedTrack( NULL ); - - mSnapManager.reset(); - - // Do not draw yellow lines - if (mSnapLeft != -1 || mSnapRight != -1) { - mSnapLeft = mSnapRight = -1; - Refresh(false); - } - - if (!mDidSlideVertically && mHSlideAmount==0) - return; - MakeParentRedrawScrollbars(); wxString msg;