From c4233199c58b10d0539560cc1255c6bb31f7efb0 Mon Sep 17 00:00:00 2001 From: Rodrigo Braz Monteiro Date: Sat, 13 Jan 2007 06:17:14 +0000 Subject: [PATCH] Fixes to audio and typesetting Originally committed to SVN as r783. --- aegisub/audio_display.cpp | 3 ++- aegisub/video_display_visual.cpp | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/aegisub/audio_display.cpp b/aegisub/audio_display.cpp index 8e105d5a2..7b18ff89d 100644 --- a/aegisub/audio_display.cpp +++ b/aegisub/audio_display.cpp @@ -1256,6 +1256,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) { int start = karaoke->syllables.at(syl).position * 10 + dialogue->Start.GetMS(); int count = karaoke->syllables.at(syl).length * 10; player->Play(GetSampleAtMS(start),GetSampleAtMS(count)); + //return; } } } @@ -1329,7 +1330,7 @@ void AudioDisplay::OnMouseEvent(wxMouseEvent& event) { } // Dragging nothing, time from scratch - if (!gotGrab) { + if (!gotGrab && !karMode) { if (buttonIsDown) { if (leftIsDown) hold = 3; else hold = 2; diff --git a/aegisub/video_display_visual.cpp b/aegisub/video_display_visual.cpp index a3548bced..c0ad3d233 100644 --- a/aegisub/video_display_visual.cpp +++ b/aegisub/video_display_visual.cpp @@ -853,7 +853,9 @@ void VideoDisplayVisual::OnMouseEvent (wxMouseEvent &event) { diag = parent->grid->GetDialogue(i); if (diag) { // Line visible? - if (diag->Start.GetMS() <= startMs && diag->End.GetMS() >= endMs) { + int f1 = VFR_Output.GetFrameAtTime(diag->Start.GetMS(),true); + int f2 = VFR_Output.GetFrameAtTime(diag->End.GetMS(),false); + if (f1 <= frame_n && f2 >= frame_n) { // Get position int lineX,lineY; int torgx,torgy;