[Beamer] - Only save user-configuration when form is closing.

This commit is contained in:
Ivandro Ismael 2016-05-14 00:54:24 +01:00
parent 8d8a6158ec
commit b186c364fe
No known key found for this signature in database
GPG Key ID: A8832757DEFB7EDC

View File

@ -167,12 +167,6 @@ namespace Nikse.SubtitleEdit.Forms
_subtitleFontName = comboBoxSubtitleFont.SelectedItem.ToString();
_subtitleFontSize = float.Parse(comboBoxSubtitleFontSize.SelectedItem.ToString());
_borderWidth = float.Parse(comboBoxBorderWidth.SelectedItem.ToString());
Configuration.Settings.SubtitleBeaming.FontName = _subtitleFontName;
Configuration.Settings.SubtitleBeaming.FontSize = (int)_subtitleFontSize;
Configuration.Settings.SubtitleBeaming.FontColor = _subtitleColor;
Configuration.Settings.SubtitleBeaming.BorderColor = _borderColor;
Configuration.Settings.SubtitleBeaming.BorderWidth = (int)_borderWidth;
}
private Bitmap GenerateImageFromTextWithStyle(string text)
@ -680,6 +674,12 @@ namespace Nikse.SubtitleEdit.Forms
private void BeamerFormClosing(object sender, FormClosingEventArgs e)
{
Cursor.Show();
// Save user-configurations.
Configuration.Settings.SubtitleBeaming.FontName = _subtitleFontName;
Configuration.Settings.SubtitleBeaming.FontSize = (int)_subtitleFontSize;
Configuration.Settings.SubtitleBeaming.FontColor = _subtitleColor;
Configuration.Settings.SubtitleBeaming.BorderColor = _borderColor;
Configuration.Settings.SubtitleBeaming.BorderWidth = (int)_borderWidth;
}
private void ComboBoxHAlignSelectedIndexChanged(object sender, EventArgs e)