Last fix for #3085

Fix  #3085
This commit is contained in:
Nikolaj Olsson 2018-09-08 09:05:52 +02:00
parent 522c321c94
commit 912b5b3d39

View File

@ -7538,16 +7538,22 @@ namespace Nikse.SubtitleEdit.Forms
if (newParagraph.Duration.TotalMilliseconds < 100)
newParagraph.EndTime.TotalMilliseconds += 100;
if (next != null && next.StartTime.IsMaxTime && prev.EndTime.IsMaxTime)
if (next.StartTime.IsMaxTime && prev.EndTime.IsMaxTime)
{
newParagraph.StartTime.TotalMilliseconds = TimeCode.MaxTimeTotalMilliseconds;
newParagraph.EndTime.TotalMilliseconds = TimeCode.MaxTimeTotalMilliseconds;
}
else if (next != null && next.StartTime.TotalMilliseconds == 0 && prev.EndTime.TotalMilliseconds == 0)
else if (next.StartTime.TotalMilliseconds == 0 && prev.EndTime.TotalMilliseconds == 0)
{
newParagraph.StartTime.TotalMilliseconds = 0;
newParagraph.EndTime.TotalMilliseconds = 0;
}
else if (prev.StartTime.TotalMilliseconds == next.StartTime.TotalMilliseconds &&
prev.EndTime.TotalMilliseconds == next.EndTime.TotalMilliseconds)
{
newParagraph.StartTime.TotalMilliseconds = prev.StartTime.TotalMilliseconds;
newParagraph.EndTime.TotalMilliseconds = prev.EndTime.TotalMilliseconds;
}
}
else if (prev != null)
{
@ -7670,6 +7676,13 @@ namespace Nikse.SubtitleEdit.Forms
newParagraph.StartTime.TotalMilliseconds = 0;
newParagraph.EndTime.TotalMilliseconds = 0;
}
else if (next != null &&
prev.StartTime.TotalMilliseconds == next.StartTime.TotalMilliseconds &&
prev.EndTime.TotalMilliseconds == next.EndTime.TotalMilliseconds)
{
newParagraph.StartTime.TotalMilliseconds = prev.StartTime.TotalMilliseconds;
newParagraph.EndTime.TotalMilliseconds = prev.EndTime.TotalMilliseconds;
}
}
else if (next != null)
{