1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-20 06:10:06 +02:00

Don't capture the mouse if it's already captured.

Otherwise the following assertion gets triggered:
../src/common/wincmn.cpp(3271): assert "!wxMouseCapture::IsInCaptureStack(this)" failed in CaptureMouse(): Recapturing the mouse in the same window?

Based on the fix provided for an identical assertion triggered elsewhere,
described here: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=765779
This commit is contained in:
Chris Diamand 2015-04-08 22:52:24 +01:00
parent 44fc5b9f4d
commit 01c346fe91

View File

@ -6126,7 +6126,8 @@ void TrackPanel::OnMouseEvent(wxMouseEvent & event)
if (event.ButtonDown()) {
SetFocus();
CaptureMouse();
if (!HasCapture())
CaptureMouse();
}
else if (event.ButtonUp()) {
if (HasCapture())