mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-10-27 22:42:38 +01:00
Better error handling in new ocr
git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1842 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
parent
cbaf6ab1b1
commit
86e78659b6
@ -3724,6 +3724,13 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
if (_nocrChars == null)
|
||||
LoadNOcrWithCurrentLanguage();
|
||||
|
||||
if (_nocrChars == null)
|
||||
{
|
||||
MessageBox.Show("Fatal - No NOCR dictionary loaded!");
|
||||
SetButtonsEnabledAfterOcrDone();
|
||||
return;
|
||||
}
|
||||
|
||||
_nocrThreadsStop = false;
|
||||
_nocrThreads = new List<BackgroundWorker>();
|
||||
_nocrThreadResults = new string[_subtitle.Paragraphs.Count];
|
||||
@ -3839,9 +3846,12 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
private void LoadNOcrWithCurrentLanguage()
|
||||
{
|
||||
string fileName = GetNOcrLanguageFileName();
|
||||
LoadNOcr(fileName, true);
|
||||
fileName = fileName.Insert(fileName.Length - 4, "_User");
|
||||
LoadNOcr(fileName, false);
|
||||
if (!string.IsNullOrEmpty(fileName))
|
||||
{
|
||||
LoadNOcr(fileName, true);
|
||||
fileName = fileName.Insert(fileName.Length - 4, "_User");
|
||||
LoadNOcr(fileName, false);
|
||||
}
|
||||
}
|
||||
|
||||
internal void SaveNOcrWithCurrentLanguage()
|
||||
|
Loading…
Reference in New Issue
Block a user