mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Merge pull request #166 from ivandrofly/patch-19
Improved: some check before trying to add to OCRfix
This commit is contained in:
commit
6fa5c8c916
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user