From 26676652d7f54de518ed348a3c672afcd71b7c3e Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Tue, 12 Jul 2016 12:13:08 -0400 Subject: [PATCH] Bug1443 again: Mac label shift-click should differ, per David Bailes --- src/LabelTrack.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/LabelTrack.cpp b/src/LabelTrack.cpp index 0badcdabd..60baf0b96 100644 --- a/src/LabelTrack.cpp +++ b/src/LabelTrack.cpp @@ -1565,12 +1565,20 @@ void LabelTrack::HandleClick(const wxMouseEvent & evt, // Find the NEW drag end auto position = FindCurrentCursorPosition(evt.m_x); + // Anchor shift-drag at the farther end of the previous highlight + // that is farther from the click, on Mac, for consistency with + // its text editors, but on the others, re-use the previous + // anchor. if (evt.ShiftDown()) { +#ifdef __WXMAC__ // Set the drag anchor at the end of the previous selection // that is farther from the NEW drag end if (abs(position - mCurrentCursorPos) > abs(position - mInitialCursorPos)) mInitialCursorPos = mCurrentCursorPos; +#else + // mInitialCursorPos remains as before +#endif } else mInitialCursorPos = position;