Fix weird issue where save as dialog does not handle "." nicely - thx Leon :)

Related to #5472
This commit is contained in:
niksedk 2021-11-14 12:54:02 +01:00
parent 26851cded3
commit a9bc1d4b7a

View File

@ -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<SsaStyle>() { style });