mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Fix assertion violations about double capture; while still making sure...
... that if you drag-scrub and ESC, you don't get a leftover white guide line.
This commit is contained in:
parent
5d533b59c7
commit
928e96c6cc
@ -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
|
||||
|
@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -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()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user