1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-15 15:49:36 +02:00

Bug 1204 - Crash when pressing both mouse buttons over toolbar buttons

Looks a very safe fix.  Post 2.1.2 should review ALL uses of CaptureMouse().
This commit is contained in:
James Crook 2015-09-21 23:11:55 +01:00
parent d776f25830
commit 39cc1fbc23

View File

@ -405,7 +405,8 @@ void AButton::OnMouseEvent(wxMouseEvent & event)
if (mEnabled && event.IsButton()) {
if (event.ButtonIsDown(wxMOUSE_BTN_ANY)) {
mIsClicking = true;
CaptureMouse();
if( !HasCapture() )
CaptureMouse();
}
else if (mIsClicking) {
mIsClicking = false;