Workaround to #503 - UI no longer semi-freezes (becomes almost completely unresponsive to input) when karaoke mode is enabled and a blank line is selected. The workaround is to simply make sure that blank lines never happen, by turning them into one empty syllable instead.

Originally committed to SVN as r1492.
This commit is contained in:
Niels Martin Hansen 2007-08-15 20:41:57 +00:00
parent aff3548407
commit f9bfa1fc43
2 changed files with 5 additions and 2 deletions

View File

@ -519,7 +519,6 @@ void AudioBox::OnKaraoke(wxCommandEvent &event) {
}
karaokeMode = false;
audioKaraoke->enabled = false;
SetKaraokeButtons();
audioDisplay->SetDialogue();
audioKaraoke->Refresh(false);
}
@ -528,9 +527,9 @@ void AudioBox::OnKaraoke(wxCommandEvent &event) {
wxLogDebug(_T("AudioBox::OnKaraoke: karaoke disabled, enabling"));
karaokeMode = true;
audioKaraoke->enabled = true;
SetKaraokeButtons();
audioDisplay->SetDialogue();
}
SetKaraokeButtons();
wxLogDebug(_T("AudioBox::OnKaraoke: returning"));
}

View File

@ -201,6 +201,10 @@ void AudioKaraoke::AutoSplit() {
newText += wxString::Format(_T("{\\k%i}"),curlen) + token;
}
// Workaround for bug #503
// Make the line one blank syllable if it's completely blank
if (newText == _T("")) newText = wxString::Format(_T("{\\k%d}"), timelen);
// Load
must_rebuild = true;
AssDialogue newDiag(diag->GetEntryData());