Merge pull request #166 from ivandrofly/patch-19

Improved: some check before trying to add to OCRfix
This commit is contained in:
Nikolaj Olsson 2014-06-19 14:17:30 +02:00
commit 6fa5c8c916

View File

@ -2104,9 +2104,14 @@ namespace Nikse.SubtitleEdit.Forms
{
string key = textBoxOcrFixKey.Text.Trim();
string value = textBoxOcrFixValue.Text.Trim();
if (key.Length == 0 || value.Length == 0)
if (key.Length == 0 || value.Length == 0 || key == value)
return;
try
{
int.Parse(key);
return;
}
catch { }
Dictionary<string, string> dictionary = _ocrFixWords;
string elementName = "Word";
string parentName = "WholeWords";