Fix gap synstax issue - thx Leon :)

Fix #5454
This commit is contained in:
niksedk 2021-11-10 07:42:29 +01:00
parent 55f838322f
commit f679db8b76

View File

@ -2072,7 +2072,15 @@ namespace Nikse.SubtitleEdit.Controls
ListViewItem item = Items[index];
if (ColumnIndexGap >= 0)
{
item.SubItems[ColumnIndexGap].Text = GetGap(paragraph, next);
var gapText = GetGap(paragraph, next);
item.SubItems[ColumnIndexGap].Text = gapText;
if (!string.IsNullOrEmpty(gapText))
{
var gapMilliseconds = (int)Math.Round(next.StartTime.TotalMilliseconds - paragraph.EndTime.TotalMilliseconds);
item.SubItems[ColumnIndexGap].BackColor = gapMilliseconds < Configuration.Settings.General.MinimumMillisecondsBetweenLines
? Configuration.Settings.Tools.ListViewSyntaxErrorColor
: BackColor;
}
}
}
}