mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-26 13:12:39 +01:00
OCR inspect line - 'Add' now updates all occurrances (also to avoid crash later)
This commit is contained in:
parent
a051b7bc2b
commit
b252c4f0e1
@ -340,6 +340,24 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
listBoxInspectItems.SelectedIndex = index;
|
||||
listBoxInspectItems_SelectedIndexChanged(null, null);
|
||||
ShowCount();
|
||||
|
||||
// update other letters that are exact matches
|
||||
for (int i = 0; i < _matches.Count; i++)
|
||||
{
|
||||
if (i != index && i < _imageSources.Count && _matches[i].ExpandCount == 0)
|
||||
{
|
||||
var newMatch = _binOcrDb.FindExactMatch(new BinaryOcrBitmap(new NikseBitmap(_imageSources[i])));
|
||||
if (newMatch >= 0 && _binOcrDb.CompareImages[newMatch].Hash == bob.Hash)
|
||||
{
|
||||
_matches[i].Name = bob.Key;
|
||||
_matches[i].ExpandCount = 0;
|
||||
_matches[i].Italic = checkBoxItalic.Checked;
|
||||
_matches[i].Text = textBoxText.Text;
|
||||
listBoxInspectItems.Items[i] = textBoxText.Text;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user