forked from mia/Aegisub
Only forward scroll wheel events to siblings and not parents to work around wx weirdness
Originally committed to SVN as r5702.
This commit is contained in:
parent
5be401a1de
commit
c199bd6d18
1 changed files with 15 additions and 3 deletions
|
@ -1009,12 +1009,24 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event)
|
||||||
{
|
{
|
||||||
wxWindow *targetwindow = wxFindWindowAtPoint(event.GetPosition());
|
wxWindow *targetwindow = wxFindWindowAtPoint(event.GetPosition());
|
||||||
if (targetwindow && targetwindow != this)
|
if (targetwindow && targetwindow != this)
|
||||||
|
{
|
||||||
|
wxWindow *parent = GetParent();
|
||||||
|
while (parent && parent != targetwindow)
|
||||||
|
{
|
||||||
|
parent = parent->GetParent();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Don't forward scroll wheel events to parents of this as the
|
||||||
|
// target is sometimes reported as a parent even when the mouse
|
||||||
|
// is over the audio display
|
||||||
|
if (!parent)
|
||||||
{
|
{
|
||||||
targetwindow->GetEventHandler()->ProcessEvent(event);
|
targetwindow->GetEventHandler()->ProcessEvent(event);
|
||||||
event.Skip(false);
|
event.Skip(false);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool zoom = event.CmdDown();
|
bool zoom = event.CmdDown();
|
||||||
if (OPT_GET("Audio/Wheel Default to Zoom")->GetBool()) zoom = !zoom;
|
if (OPT_GET("Audio/Wheel Default to Zoom")->GetBool()) zoom = !zoom;
|
||||||
|
|
Loading…
Reference in a new issue