Only writes " " in sami if next subtitle is further away then 100ms

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@1409 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2012-10-07 12:04:14 +00:00
parent 5bc5f6d644
commit dcbb167f66

View File

@ -165,7 +165,7 @@ namespace Nikse.SubtitleEdit.Logic.SubtitleFormats
string currentClass = languageTag;
if (useExtra && !string.IsNullOrEmpty(p.Extra))
currentClass = p.Extra;
if (next != null && p.EndTime.TotalMilliseconds <= next.StartTime.TotalMilliseconds && p.EndTime.TotalMilliseconds + 51 > next.StartTime.TotalMilliseconds)
if (next != null && Math.Abs(next.StartTime.TotalMilliseconds - p.EndTime.TotalMilliseconds) < 100)
sb.AppendLine(string.Format(paragraphWriteFormatOpen, p.StartTime.TotalMilliseconds, text, currentClass));
else
sb.AppendLine(string.Format(paragraphWriteFormat, p.StartTime.TotalMilliseconds, p.EndTime.TotalMilliseconds, text, currentClass));