diff --git a/src/tracks/labeltrack/ui/LabelGlyphHandle.cpp b/src/tracks/labeltrack/ui/LabelGlyphHandle.cpp index 5f7247e21..2c59202a1 100644 --- a/src/tracks/labeltrack/ui/LabelGlyphHandle.cpp +++ b/src/tracks/labeltrack/ui/LabelGlyphHandle.cpp @@ -137,8 +137,6 @@ void LabelGlyphHandle::HandleGlyphClick if (hit.mIsAdjustingLabel) { - // No to the above! We initially expect to be moving just one edge. - hit.mbIsMoving = false; double t = 0.0; @@ -168,11 +166,14 @@ void LabelGlyphHandle::HandleGlyphClick // If we're on a boundary between two different labels, // then it's an adjust. // In both cases the two points coalesce. - hit.mbIsMoving = (hit.mMouseOverLabelLeft == hit.mMouseOverLabelRight); - + // + // NOTE: seems that it's not neccessary that hitting the both + // left and right handles mean that we're dealing with a point, + // but the range will be turned into a point on click + bool isPointLabel = hit.mMouseOverLabelLeft == hit.mMouseOverLabelRight; // Except! We don't coalesce if both ends are from the same label and // we have deliberately chosen to preserve length, by holding shift down. - if (!(hit.mbIsMoving && evt.ShiftDown())) + if (!(isPointLabel && evt.ShiftDown())) { MayAdjustLabel(hit, hit.mMouseOverLabelLeft, -1, false, t); MayAdjustLabel(hit, hit.mMouseOverLabelRight, 1, false, t); @@ -218,13 +219,6 @@ UIHandle::Result LabelGlyphHandle::Click // redraw the track. result |= RefreshCode::RefreshCell; - // handle shift+ctrl down - /*if (event.ShiftDown()) { // && event.ControlDown()) { - lTrack->SetHighlightedByKey(true); - Refresh(false); - return; - }*/ - return result; } diff --git a/src/tracks/labeltrack/ui/LabelGlyphHandle.h b/src/tracks/labeltrack/ui/LabelGlyphHandle.h index ca0b978e0..fa8f255e1 100644 --- a/src/tracks/labeltrack/ui/LabelGlyphHandle.h +++ b/src/tracks/labeltrack/ui/LabelGlyphHandle.h @@ -39,7 +39,6 @@ struct LabelTrackHit int mMouseOverLabel{ -1 }; /// Keeps track of which (ranged) label the mouse is currently over. int mMouseOverLabelLeft{ -1 }; /// Keeps track of which left label the mouse is currently over. int mMouseOverLabelRight{ -1 }; /// Keeps track of which right label the mouse is currently over. - bool mbIsMoving {}; bool mIsAdjustingLabel {}; std::shared_ptr mpLT {};