Fix for last commit

This commit is contained in:
Nikolaj Olsson 2024-03-21 16:47:42 +01:00
parent 66ca5566ec
commit ba05ee99dc

View File

@ -551,12 +551,8 @@ namespace Nikse.SubtitleEdit.Controls
Configuration.Settings.General.VideoPlayerPreviewFontSize + ",&H00FFFFFF,&H0300FFFF,&H00000000,&H02000000," +
(Configuration.Settings.General.VideoPlayerPreviewFontBold ? "-1" : "0") + ",0,0,0,100,100,0,0,3,2,0,2,10,10,10,1" +
Environment.NewLine + "Style: Default,");
for (var index = 0; index < subtitle.Paragraphs.Count; index++)
{
var p = subtitle.Paragraphs[index];
p.Extra = "Default";
var useBox = false;
if (Configuration.Settings.SubtitleSettings.EbuStlTeletextUseBox)
{
try
@ -566,7 +562,7 @@ namespace Nikse.SubtitleEdit.Controls
var header = Ebu.ReadHeader(buffer);
if (header.DisplayStandardCode != "0")
{
p.Extra = "Box";
useBox = true;
}
}
catch
@ -575,6 +571,12 @@ namespace Nikse.SubtitleEdit.Controls
}
}
for (var index = 0; index < subtitle.Paragraphs.Count; index++)
{
var p = subtitle.Paragraphs[index];
p.Extra = useBox ? "Box" : "Default";
if (p.Text.Contains("<box>"))
{
p.Extra = "Box";