diff --git a/src/tracks/ui/Scrubbing.cpp b/src/tracks/ui/Scrubbing.cpp index 7175175ad..00893bbaa 100644 --- a/src/tracks/ui/Scrubbing.cpp +++ b/src/tracks/ui/Scrubbing.cpp @@ -411,11 +411,6 @@ void Scrubber::StopScrubbing() } mProject->GetRulerPanel()->HideQuickPlayIndicator(); - - // Need this in case ruler gets the mouse-up event after escaping scrubbing: - // prevent reappearance of the - // quick play guideline - mProject->GetRulerPanel()->IgnoreMouseUp(); } bool Scrubber::IsScrubbing() const diff --git a/src/widgets/Ruler.cpp b/src/widgets/Ruler.cpp index 75e802356..f7725f417 100644 --- a/src/widgets/Ruler.cpp +++ b/src/widgets/Ruler.cpp @@ -2328,17 +2328,6 @@ bool AdornedRulerPanel::IsWithinMarker(int mousePosX, double markerTime) void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt) { - if (mIgnoreMouseUp) { - if (evt.Dragging()) - return; - else if (evt.ButtonUp()) { - mIgnoreMouseUp = false; - return; - } - else - mIgnoreMouseUp = false; - } - // PRL: why do I need these two lines on Windows but not on Mac? if (evt.ButtonDown(wxMOUSE_BTN_ANY)) SetFocus(); @@ -2516,13 +2505,16 @@ void AdornedRulerPanel::OnMouseEvents(wxMouseEvent &evt) mDoubleClick = false; HandleQPClick(evt, mousePosX); HandleQPDrag(evt, mousePosX); + ShowQuickPlayIndicator(); } - else if (evt.LeftIsDown()) + else if (evt.LeftIsDown() && HasCapture()) { HandleQPDrag(evt, mousePosX); - else if (evt.LeftUp()) + ShowQuickPlayIndicator(); + } + else if (evt.LeftUp() && HasCapture()) { HandleQPRelease(evt); - - ShowQuickPlayIndicator(); + ShowQuickPlayIndicator(); + } } } diff --git a/src/widgets/Ruler.h b/src/widgets/Ruler.h index 543e88c79..3e63ca49a 100644 --- a/src/widgets/Ruler.h +++ b/src/widgets/Ruler.h @@ -354,7 +354,6 @@ public: void ShowQuickPlayIndicator(); void HideQuickPlayIndicator(); void UpdateQuickPlayPos(wxCoord &mousPosX); - void IgnoreMouseUp() { mIgnoreMouseUp = true; } private: void OnCapture(wxCommandEvent & evt); @@ -536,7 +535,6 @@ private: mutable wxFont mButtonFont; bool mDoubleClick {}; - bool mIgnoreMouseUp {}; DECLARE_EVENT_TABLE()