mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-30 23:23:44 +02:00
Bug1325: Drag-scrolling now works again on Mac. ...
... The explanation was not, as I had thought, that mouse capture is simply broken in wxWidgets 3.0.2 for Mac. Instead, it now appears that Leaving mouse events always falsely report no buttons are down, which confused our code.
This commit is contained in:
parent
e67725f00f
commit
1910c9eda1
@ -5903,20 +5903,23 @@ void TrackPanel::OnMouseEvent(wxMouseEvent & event)
|
||||
|
||||
if (event.Leaving() && !event.ButtonIsDown(wxMOUSE_BTN_ANY))
|
||||
{
|
||||
// PRL: was this test really needed? It interfered with my refactoring
|
||||
// that tried to eliminate those enum values.
|
||||
// I think it was never true, that mouse capture was pan or gain sliding,
|
||||
// but no mouse button was down.
|
||||
// if (mMouseCapture != IsPanSliding && mMouseCapture != IsGainSliding)
|
||||
{
|
||||
SetCapturedTrack(NULL);
|
||||
#if defined(__WXMAC__)
|
||||
// We must install the cursor ourselves since the window under
|
||||
// the mouse is no longer this one and wx2.8.12 makes that check.
|
||||
// Should re-evaluate with wx3.
|
||||
wxSTANDARD_CURSOR->MacInstall();
|
||||
|
||||
// We must install the cursor ourselves since the window under
|
||||
// the mouse is no longer this one and wx2.8.12 makes that check.
|
||||
// Should re-evaluate with wx3.
|
||||
wxSTANDARD_CURSOR->MacInstall();
|
||||
|
||||
// Bug 1325: It appears wxWidgets 3 always says no buttons are down
|
||||
// in Leaving events, incorrectly. So don't do this:
|
||||
|
||||
// SetCapturedTrack(NULL);
|
||||
|
||||
#else
|
||||
|
||||
SetCapturedTrack(NULL);
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
switch( mMouseCapture )
|
||||
|
Loading…
x
Reference in New Issue
Block a user