Only auto-br if total "merge length" exceeds max line length - thx Llorx :)

Try to fix #8741
This commit is contained in:
Nikolaj Olsson 2024-08-17 15:25:32 +02:00
parent 7b810fa98a
commit db527e4985

View File

@ -13218,8 +13218,17 @@ namespace Nikse.SubtitleEdit.Forms
}
else
{
currentParagraph.Text = (currentParagraph.Text.Trim() + Environment.NewLine +
RemoveAssStartAlignmentTag(nextParagraph.Text).Trim()).Trim();
var text = (currentParagraph.Text.Trim() + Environment.NewLine +
RemoveAssStartAlignmentTag(nextParagraph.Text).Trim()).Trim();
var oneLine = Utilities.UnbreakLine(text);
if (oneLine.Length <= Configuration.Settings.General.SubtitleLineMaximumLength)
{
currentParagraph.Text = oneLine;
}
else
{
currentParagraph.Text = text;
}
}
currentParagraph.Text = FixAssaTagsAfterMerge(currentParagraph.Text);