Fix for show "Expand selection" in OCR

This commit is contained in:
Nikolaj Olsson 2017-08-12 15:51:26 +02:00
parent 0204e07cc4
commit c38a75c5af
2 changed files with 2 additions and 5 deletions

View File

@ -4335,7 +4335,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
if (match == null)
{
int nextIndex = index + 1;
var allowExpand = nextIndex < list.Count && list[nextIndex].SpecialCharacter != Environment.NewLine;
var allowExpand = nextIndex < list.Count && (list[nextIndex].SpecialCharacter != Environment.NewLine && list[nextIndex].SpecialCharacter != " ");
_vobSubOcrCharacter.Initialize(bitmap, item, _manualOcrDialogPosition, _italicCheckedLast, false, bestGuess, _lastAdditions, this, allowExpand);
DialogResult result = _vobSubOcrCharacter.ShowDialog(this);

View File

@ -134,10 +134,7 @@ namespace Nikse.SubtitleEdit.Forms.Ocr
pictureBoxCharacter.Top = labelCharacters.Top + 16;
pictureBoxLastEdit.Left = buttonLastEdit.Left + buttonLastEdit.Width + 5;
if (!allowExpand)
{
buttonExpandSelection.Visible = false;
}
buttonExpandSelection.Visible = allowExpand;
}
private void ButtonOkClick(object sender, EventArgs e)