From a9bc1d4b7af781f1e4c5ed8325060741dd19ca45 Mon Sep 17 00:00:00 2001 From: niksedk Date: Sun, 14 Nov 2021 12:54:02 +0100 Subject: [PATCH] Fix weird issue where save as dialog does not handle "." nicely - thx Leon :) Related to #5472 --- src/ui/Forms/GenerateVideoWithHardSubs.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ui/Forms/GenerateVideoWithHardSubs.cs b/src/ui/Forms/GenerateVideoWithHardSubs.cs index c71544616..613ba850e 100644 --- a/src/ui/Forms/GenerateVideoWithHardSubs.cs +++ b/src/ui/Forms/GenerateVideoWithHardSubs.cs @@ -113,7 +113,7 @@ namespace Nikse.SubtitleEdit.Forms numericUpDownFontSize.Value = fontSize.Value; } - checkBoxRightToLeft.Checked = Configuration.Settings.General.RightToLeftMode && + checkBoxRightToLeft.Checked = Configuration.Settings.General.RightToLeftMode && LanguageAutoDetect.CouldBeRightToLeftLanguage(_assaSubtitle); } else @@ -195,7 +195,7 @@ namespace Nikse.SubtitleEdit.Forms buttonOK.Enabled = false; numericUpDownFontSize.Enabled = false; - using (var saveDialog = new SaveFileDialog { FileName = SuggestNewVideoFileName(), Filter = "MP4|*.mp4|Matroska|*.mkv|WebM|*.webm" }) + using (var saveDialog = new SaveFileDialog { FileName = SuggestNewVideoFileName(), Filter = "MP4|*.mp4|Matroska|*.mkv|WebM|*.webm", AddExtension = true }) { if (saveDialog.ShowDialog(this) != DialogResult.OK) { @@ -286,7 +286,7 @@ namespace Nikse.SubtitleEdit.Forms fileName += ".x264"; } - return fileName; + return fileName.Replace(".", "_") + ".mp4"; } private void FixRightToLeft(Subtitle subtitle) @@ -801,7 +801,7 @@ namespace Nikse.SubtitleEdit.Forms if (checkBoxBox.Checked) { style.BorderStyle = "4"; // box - multi line - style.ShadowWidth = 5; + style.ShadowWidth = 5; } sub.Header = AdvancedSubStationAlpha.GetHeaderAndStylesFromAdvancedSubStationAlpha(sub.Header, new System.Collections.Generic.List() { style });