Fix "Add better match" with only italic changed

This commit is contained in:
Nikolaj Olsson 2020-05-18 07:35:45 +02:00
parent ceb65be83b
commit 9f43472ac4

View File

@ -380,9 +380,9 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
return;
}
if (listBoxInspectItems.Items[listBoxInspectItems.SelectedIndex].ToString().Replace(" (italic)", string.Empty) == textBoxText.Text)
if (listBoxInspectItems.Items[listBoxInspectItems.SelectedIndex].ToString() == textBoxText.Text + (checkBoxItalic.Checked ? " (italic)" : string.Empty))
{
// text not changed
// text (or italic) not changed
textBoxText.SelectAll();
textBoxText.Focus();
return;