Audio display in SSA mode will no longer ignore clicks if it wasn't focused

Originally committed to SVN as r98.
This commit is contained in:
Rodrigo Braz Monteiro 2006-02-21 21:33:15 +00:00
parent b823bfdc99
commit fb579fa948
3 changed files with 17 additions and 3 deletions

View file

@ -73,6 +73,7 @@ AudioDisplay::AudioDisplay(wxWindow *parent,VideoDisplay *display)
loaded = false;
blockUpdate = false;
dontReadTimes = false;
holding = false;
Position = 0;
PositionSample = 0;
oldCurPos = 0;
@ -1079,6 +1080,16 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
if (wxWindow::FindFocus() != this && Options.AsBool(_T("Audio Autofocus"))) SetFocus();
}
// Click type
if (event.ButtonDown(wxMOUSE_BTN_LEFT) && !holding) {
holding = true;
CaptureMouse();
}
if (!event.ButtonIsDown(wxMOUSE_BTN_LEFT) && holding) {
holding = false;
ReleaseMouse();
}
// Mouse wheel
if (event.GetWheelRotation() != 0) {
// Zoom or scroll?
@ -1152,14 +1163,15 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) {
// Left click
if (event.ButtonDown(wxMOUSE_BTN_LEFT)) {
if (wxWindow::FindFocus() != this) {
//if (wxWindow::FindFocus() != this) {
SetFocus();
return;
}
//return;
//}
}
// Right click
if (event.ButtonDown(wxMOUSE_BTN_RIGHT)) {
SetFocus();
if (karaoke->enabled) {
int syl = GetSyllableAtX(x);
if (syl != -1) {

View file

@ -76,6 +76,7 @@ private:
bool hasSel;
bool hasKaraoke;
bool diagUpdated;
bool holding;
__int64 selStart;
__int64 selEnd;
__int64 lineStart;

View file

@ -41,6 +41,7 @@ Please visit http://aegisub.net to download latest version
- Added a volume slider bar to audio mode. (AMZ)
- Fixed some internal workings, which should make Aegisub use considerably less RAM (especially for large Karaoke files, 3x less RAM usage measured). (AMZ)
- Aegisub will now dump the stack to stack.txt when it crashes with a fatal exception, which might or might not work. (AMZ)
- Audio display in SSA mode will no longer ignore clicks if it wasn't focused (AMZ)
= 1.09 beta - 2006.01.16 ===========================