mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-22 03:02:35 +01:00
Fix for ASSA new file default style - thx mpr0st :)
Fix #7839 (when default style if not "Default")
This commit is contained in:
parent
fbc1447428
commit
730ff76951
@ -178,7 +178,9 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text"
|
||||
else
|
||||
{
|
||||
sb.AppendFormat(header, title).AppendLine();
|
||||
styles = GetStylesFromHeader(header);
|
||||
}
|
||||
|
||||
foreach (var p in subtitle.Paragraphs)
|
||||
{
|
||||
var start = MakeTimeCode(timeCodeFormat, p.StartTime);
|
||||
@ -188,6 +190,10 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text"
|
||||
{
|
||||
style = p.Extra;
|
||||
}
|
||||
else if (styles.Count > 0 && !styles.Contains(style) && styles.Contains(p.Extra))
|
||||
{
|
||||
style = p.Extra;
|
||||
}
|
||||
|
||||
if (fromTtml && !string.IsNullOrEmpty(p.Style) && isValidAssHeader && styles.Contains(p.Style))
|
||||
{
|
||||
@ -241,6 +247,7 @@ Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text"
|
||||
sb.AppendLine();
|
||||
sb.AppendLine(subtitle.Footer);
|
||||
}
|
||||
|
||||
return sb.ToString().Trim() + Environment.NewLine;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user