From e09ebcf4429998da52b673fa3fb8984ffe71663d Mon Sep 17 00:00:00 2001 From: Niels Martin Hansen Date: Sat, 30 Jun 2007 00:00:44 +0000 Subject: [PATCH] Karaoke join back to working state. Originally committed to SVN as r1315. --- aegisub/audio_karaoke.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/aegisub/audio_karaoke.cpp b/aegisub/audio_karaoke.cpp index 886161c55..5ac413ddf 100644 --- a/aegisub/audio_karaoke.cpp +++ b/aegisub/audio_karaoke.cpp @@ -582,14 +582,18 @@ void AudioKaraoke::Join() { // Loop for (size_t i=0;itext.c_str(), curSyl->unstripped_text.c_str(), curSyl->duration); if (curSyl->selected) { if (!gotOne) { gotOne = true; first = i; } else { - syllables.at(i-1).duration += curSyl->duration; - syllables.at(i-1).unstripped_text += curSyl->unstripped_text; + AudioKaraokeSyllable &work = syllables.at(first); + wxLogDebug(_T("AudioKaraoke::Join: worksyl %d, text='%s', unstripped_text='%s', duration=%d"), i, work.text.c_str(), work.unstripped_text.c_str(), work.duration); + work.duration += curSyl->duration; + work.text += curSyl->text; + work.unstripped_text += curSyl->unstripped_text; syllables.erase(syllables.begin()+i); i--; syls--; @@ -605,6 +609,8 @@ void AudioKaraoke::Join() { display->NeedCommit = true; display->Update(); Refresh(false); + + wxLogDebug(_T("AudioKaraoke::Join: returning")); }