use more appropriate variable names in kanji timer...
Originally committed to SVN as r1177.
This commit is contained in:
parent
5b9a374f6e
commit
190dcfe02e
1 changed files with 15 additions and 8 deletions
|
@ -247,7 +247,7 @@ void DialogKanjiTimer::OnSkipSource(wxCommandEvent &event) {
|
||||||
int index = ListIndexFromStyleandIndex(SourceStyle->GetValue(), SourceIndex);
|
int index = ListIndexFromStyleandIndex(SourceStyle->GetValue(), SourceIndex);
|
||||||
if (index != -1) {
|
if (index != -1) {
|
||||||
AssDialogue *line = grid->GetDialogue(index);
|
AssDialogue *line = grid->GetDialogue(index);
|
||||||
AssDialogueBlockOverride *override;
|
AssDialogueBlockOverride *ovr;
|
||||||
AssDialogueBlockPlain *plain;
|
AssDialogueBlockPlain *plain;
|
||||||
AssOverrideTag *tag;
|
AssOverrideTag *tag;
|
||||||
wxRegEx reK(_T("\\\\[kK][of]?"),wxRE_NOSUB);
|
wxRegEx reK(_T("\\\\[kK][of]?"),wxRE_NOSUB);
|
||||||
|
@ -266,8 +266,8 @@ void DialogKanjiTimer::OnSkipSource(wxCommandEvent &event) {
|
||||||
|
|
||||||
for (size_t i=0;i<blockn;i++) {
|
for (size_t i=0;i<blockn;i++) {
|
||||||
k = 0;
|
k = 0;
|
||||||
override = AssDialogueBlock::GetAsOverride(line->Blocks.at(i));
|
ovr = AssDialogueBlock::GetAsOverride(line->Blocks.at(i));
|
||||||
if (override) {
|
if (ovr) {
|
||||||
if (LastWasOverride) {
|
if (LastWasOverride) {
|
||||||
/* Explanation for LastWasOverride:
|
/* Explanation for LastWasOverride:
|
||||||
* If we have a karaoke block with no text (IE for a pause)
|
* If we have a karaoke block with no text (IE for a pause)
|
||||||
|
@ -276,8 +276,8 @@ void DialogKanjiTimer::OnSkipSource(wxCommandEvent &event) {
|
||||||
*/
|
*/
|
||||||
RegroupSourceText[textIndex++] = _T("");
|
RegroupSourceText[textIndex++] = _T("");
|
||||||
}
|
}
|
||||||
for (size_t j=0;j<override->Tags.size();j++) {
|
for (size_t j=0;j<ovr->Tags.size();j++) {
|
||||||
tag = override->Tags.at(j);
|
tag = ovr->Tags.at(j);
|
||||||
|
|
||||||
if (reK.Matches(tag->Name)&&tag->Params.size() == 1)
|
if (reK.Matches(tag->Name)&&tag->Params.size() == 1)
|
||||||
k = tag->Params[0]->AsInt();
|
k = tag->Params[0]->AsInt();
|
||||||
|
@ -356,9 +356,11 @@ void DialogKanjiTimer::OnAccept(wxCommandEvent &event) {
|
||||||
for(int index=0;index!=ItemCount;index++) {
|
for(int index=0;index!=ItemCount;index++) {
|
||||||
SourceLength = RegroupGroups[index<<1].Len();
|
SourceLength = RegroupGroups[index<<1].Len();
|
||||||
|
|
||||||
if (RegroupSourceText[SourceIndex].Len() == 0) {
|
if (RegroupSourceText[SourceIndex].Len() == 0 && RegroupSourceKLengths[SourceIndex] != 0) {
|
||||||
//Karaoke block w/o text that is NOT in the middle of a group, just copy it over
|
//Karaoke block with len>0 w/o text that is NOT in the middle of a group, just copy it over
|
||||||
// since we can't figure out if it should go to the previous or the next group
|
// since we can't figure out if it should go to the previous or the next group.
|
||||||
|
// We're not going to copy these if they're 0 length because if they're 0 length and have no
|
||||||
|
// text, then they're not necessary.
|
||||||
OutputText = wxString::Format(_("%s{\\k%i}"),OutputText.c_str(),RegroupSourceKLengths[SourceIndex]);
|
OutputText = wxString::Format(_("%s{\\k%i}"),OutputText.c_str(),RegroupSourceKLengths[SourceIndex]);
|
||||||
SourceIndex++;
|
SourceIndex++;
|
||||||
}
|
}
|
||||||
|
@ -440,6 +442,11 @@ void DialogKanjiTimer::SetSelected() {
|
||||||
else if (DestText->GetValue().StartsWith(SourceText->GetStringSelection()))
|
else if (DestText->GetValue().StartsWith(SourceText->GetStringSelection()))
|
||||||
DestText->SetSelection(0,SourceText->GetStringSelection().Len());
|
DestText->SetSelection(0,SourceText->GetStringSelection().Len());
|
||||||
|
|
||||||
|
else if (DestText->GetValue().Len()==1) {
|
||||||
|
SourceText->SelectAll();
|
||||||
|
DestText->SelectAll();
|
||||||
|
}
|
||||||
|
|
||||||
else if (SourceText->GetValue().Len()!=0 && DestText->GetValue().Len()!=0) {
|
else if (SourceText->GetValue().Len()!=0 && DestText->GetValue().Len()!=0) {
|
||||||
bool foundit = false;
|
bool foundit = false;
|
||||||
if (Interpolate->IsChecked()) {
|
if (Interpolate->IsChecked()) {
|
||||||
|
|
Loading…
Reference in a new issue