From 113479edbdd0c5703ccfa7514d27146a6bb50dc7 Mon Sep 17 00:00:00 2001 From: niksedk Date: Sun, 2 Oct 2022 10:04:11 +0200 Subject: [PATCH] Do not use fullname in compare export - thx Leon :) Work on #6302 --- src/ui/Forms/Compare.cs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/ui/Forms/Compare.cs b/src/ui/Forms/Compare.cs index 19868e9a2..86edc7d0f 100644 --- a/src/ui/Forms/Compare.cs +++ b/src/ui/Forms/Compare.cs @@ -1316,9 +1316,9 @@ namespace Nikse.SubtitleEdit.Forms sb.AppendLine("

Subtitle Edit compare

"); sb.AppendLine(" "); sb.AppendLine(" "); - sb.AppendLine(" "); + sb.AppendLine(" "); sb.AppendLine(" "); - sb.AppendLine(" "); + sb.AppendLine(" "); sb.AppendLine(" "); for (var i = 0; i < subtitleListView1.Items.Count; i++) { @@ -1356,6 +1356,11 @@ namespace Nikse.SubtitleEdit.Forms } } + private static string GetFileName(string fileName) + { + return string.IsNullOrEmpty(fileName) ? string.Empty : Path.GetFileName(fileName); + } + private static string GetHtmlText(Paragraph p, string text) { return p.IsDefault ? string.Empty : HtmlUtil.EncodeNamed(text);
" + labelSubtitle1.Text + "" + GetFileName(labelSubtitle1.Text) + " " + labelSubtitle2.Text + "" + GetFileName(labelSubtitle2.Text) + "