Skip to content

Commit

Permalink
Fix for setting WebVTT style
Browse files Browse the repository at this point in the history
  • Loading branch information
niksedk committed Nov 18, 2023
1 parent e965a39 commit a28804b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
3 changes: 1 addition & 2 deletions src/libse/Common/WebVttHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -488,8 +488,7 @@ public static List<string> GetParagraphStyles(Paragraph paragraph)

public static string SetParagraphStyles(Paragraph p, List<WebVttStyle> styles)
{
if (string.IsNullOrEmpty(p.Text) ||
!p.Text.Contains("<c.", StringComparison.Ordinal))
if (string.IsNullOrEmpty(p.Text))
{
return p.Text;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/Forms/VTT/WebVttStylePicker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ private void buttonOK_Click(object sender, EventArgs e)
}
}

DialogResult = ImportExportStyles.Count == 0 ? DialogResult.Cancel : DialogResult.OK;
DialogResult = DialogResult.OK;
}

private void WebVttImportExport_KeyDown(object sender, KeyEventArgs e)
Expand Down

0 comments on commit a28804b

Please sign in to comment.