Fix for continuing ocr - thx Janusz :)

Related to https://forum.doom9.org/showthread.php?t=162721&page=77
This commit is contained in:
niksedk 2022-01-25 08:06:28 +01:00
parent 9b4b9760ec
commit a65c42e346

View File

@ -5161,6 +5161,15 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
_mainOcrTimerMax = max;
_mainOcrIndex = (int)numericUpDownStartNumber.Value - 1;
if (_mainOcrIndex > 0)
{
var lastP = _subtitle.GetParagraphOrDefault(_mainOcrIndex - 1);
if (lastP != null && !string.IsNullOrEmpty(lastP.Text))
{
_lastLine = lastP.Text;
}
}
_mainOcrTimer = new Timer();
_mainOcrTimer.Tick += mainOcrTimer_Tick;
_mainOcrTimer.Interval = 5;