mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 11:12:36 +01:00
[FixDialogsOnOneLine] - Cache line count.
This commit is contained in:
parent
f0ae1acb82
commit
2db5dfbe9d
@ -175,7 +175,8 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
|
||||
var idx = text.IndexOfAny(EndPlusDashList, StringComparison.Ordinal);
|
||||
if (idx >= 0)
|
||||
{
|
||||
if (Utilities.GetNumberOfLines(text) == 2)
|
||||
int lineCount = Utilities.GetNumberOfLines(text);
|
||||
if (lineCount == 2)
|
||||
{
|
||||
string temp = Utilities.AutoBreakLine(text, 99, 33, language);
|
||||
var arr = text.SplitToLines();
|
||||
@ -188,7 +189,7 @@ namespace Nikse.SubtitleEdit.Core.Forms.FixCommonErrors
|
||||
text = temp;
|
||||
}
|
||||
}
|
||||
else if (Utilities.GetNumberOfLines(text) == 1)
|
||||
else if (lineCount == 1)
|
||||
{
|
||||
string temp = Utilities.AutoBreakLine(text, language);
|
||||
var arrTemp = temp.SplitToLines();
|
||||
|
Loading…
Reference in New Issue
Block a user