forked from mia/Aegisub
Implement the "Auto-focus audio display on mouse over" option
Originally committed to SVN as r6293.
This commit is contained in:
parent
9166eb1d6b
commit
d8cedf0eec
1 changed files with 2 additions and 1 deletions
|
@ -595,6 +595,7 @@ AudioDisplay::AudioDisplay(wxWindow *parent, AudioController *controller, agi::C
|
|||
Bind(wxEVT_MIDDLE_UP, &AudioDisplay::OnMouseEvent, this);
|
||||
Bind(wxEVT_RIGHT_UP, &AudioDisplay::OnMouseEvent, this);
|
||||
Bind(wxEVT_MOTION, &AudioDisplay::OnMouseEvent, this);
|
||||
Bind(wxEVT_ENTER_WINDOW, &AudioDisplay::OnMouseEvent, this);
|
||||
}
|
||||
|
||||
|
||||
|
@ -1062,7 +1063,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event)
|
|||
return;
|
||||
}
|
||||
|
||||
if (event.IsButton())
|
||||
if (event.IsButton() || (event.Entering() && OPT_GET("Audio/Auto/Focus")->GetBool()))
|
||||
SetFocus();
|
||||
|
||||
// Handle any ongoing drag
|
||||
|
|
Loading…
Reference in a new issue