1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-11 17:41:15 +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

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