From a65c42e3462f5291709df967fb39d91150dba26b Mon Sep 17 00:00:00 2001 From: niksedk Date: Tue, 25 Jan 2022 08:06:28 +0100 Subject: [PATCH] Fix for continuing ocr - thx Janusz :) Related to https://forum.doom9.org/showthread.php?t=162721&page=77 --- src/ui/Forms/Ocr/VobSubOcr.cs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/ui/Forms/Ocr/VobSubOcr.cs b/src/ui/Forms/Ocr/VobSubOcr.cs index 4fc8f8268..30cb8e18c 100644 --- a/src/ui/Forms/Ocr/VobSubOcr.cs +++ b/src/ui/Forms/Ocr/VobSubOcr.cs @@ -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;