Merge two lines - don't auto-br is one line is empty - thx darnn :)

Fix  #2367
This commit is contained in:
Nikolaj Olsson 2017-05-04 21:02:37 +02:00
parent e5bb4d158c
commit 39f164e7f2

View File

@ -8766,14 +8766,13 @@ namespace Nikse.SubtitleEdit.Forms
old1.Length > Configuration.Settings.General.SubtitleLineMaximumLength || old2.Length > Configuration.Settings.General.SubtitleLineMaximumLength)
currentParagraph.Text = Utilities.AutoBreakLine(currentParagraph.Text, LanguageAutoDetect.AutoDetectGoogleLanguage(_subtitle));
if (string.IsNullOrWhiteSpace(old1))
currentParagraph.Text = currentParagraph.Text.TrimStart();
if (string.IsNullOrWhiteSpace(old1) && old2 != null)
currentParagraph.Text = old2.Trim();
if (string.IsNullOrWhiteSpace(old2))
currentParagraph.Text = currentParagraph.Text.TrimEnd();
if (string.IsNullOrWhiteSpace(old2) && old1 != null)
currentParagraph.Text = old1.Trim();
}
//currentParagraph.EndTime.TotalMilliseconds = currentParagraph.EndTime.TotalMilliseconds + nextParagraph.Duration.TotalMilliseconds; //nextParagraph.EndTime;
currentParagraph.EndTime.TotalMilliseconds = nextParagraph.EndTime.TotalMilliseconds;
if (_networkSession != null)