mirror of
https://github.com/SubtitleEdit/subtitleedit.git
synced 2024-11-25 04:33:04 +01:00
Replace timed text 1.0 ext in favorite formats if changed
This commit is contained in:
parent
5e5cf95360
commit
3e309da6ad
@ -310,7 +310,21 @@ namespace Nikse.SubtitleEdit.Forms
|
||||
_subtitle.Header = _xml.OuterXml;
|
||||
|
||||
Configuration.Settings.SubtitleSettings.TimedText10TimeCodeFormat = comboBoxTimeCodeFormat.SelectedItem.ToString();
|
||||
Configuration.Settings.SubtitleSettings.TimedText10FileExtension= comboBoxFileExtensions.SelectedItem.ToString();
|
||||
|
||||
var currentTimedTextExt = Configuration.Settings.SubtitleSettings.TimedText10FileExtension;
|
||||
var newTimedTextExt = comboBoxFileExtensions.SelectedItem.ToString();
|
||||
if (currentTimedTextExt != newTimedTextExt)
|
||||
{
|
||||
var favoriteFormats = Configuration.Settings.General.FavoriteSubtitleFormats;
|
||||
var currentTimedTextWithExt = $"Timed Text 1.0 ({currentTimedTextExt})";
|
||||
var newTimedTextWithExt = $"Timed Text 1.0 ({newTimedTextExt})";
|
||||
if (favoriteFormats.Contains(currentTimedTextWithExt))
|
||||
{
|
||||
Configuration.Settings.General.FavoriteSubtitleFormats = favoriteFormats.Replace(currentTimedTextWithExt, newTimedTextWithExt);
|
||||
}
|
||||
|
||||
Configuration.Settings.SubtitleSettings.TimedText10FileExtension = newTimedTextExt;
|
||||
}
|
||||
|
||||
DialogResult = DialogResult.OK;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user