Fixed bug when saving framerate with European "," instead of "." - thx by yannick :)

git-svn-id: https://subtitleedit.googlecode.com/svn/trunk@963 99eadd0c-20b8-1223-b5c4-2a2b2df33de2
This commit is contained in:
niksedk 2012-02-05 07:20:54 +00:00
parent bb2b366872
commit 322f960419
2 changed files with 6 additions and 2 deletions

View File

@ -744,7 +744,9 @@ namespace Nikse.SubtitleEdit.Forms
gs.ShowToolbarHelp = checkBoxHelp.Checked;
gs.ShowFrameRate = checkBoxShowFrameRate.Checked;
gs.DefaultFrameRate = double.Parse(comboBoxFramerate.Text);
double outFrameRate;
if (double.TryParse(comboBoxFramerate.Text.Replace(",", "."), NumberStyles.AllowDecimalPoint, CultureInfo.InvariantCulture, out outFrameRate))
gs.DefaultFrameRate = outFrameRate;
gs.DefaultEncoding = comboBoxEncoding.Text;
gs.AutoGuessAnsiEncoding = checkBoxAutoDetectAnsiEncoding.Checked;
gs.SubtitleFontSize = int.Parse(comboBoxSubtitleFontSize.Text);

View File

@ -785,7 +785,9 @@ namespace Nikse.SubtitleEdit.Logic
if (subNode != null)
{
settings.General.DefaultFrameRate = Convert.ToDouble(subNode.InnerText);
settings.General.CurrentFrameRate = Convert.ToDouble(subNode.InnerText);
if (settings.General.DefaultFrameRate > 23975)
settings.General.DefaultFrameRate = 23.976;
settings.General.CurrentFrameRate = settings.General.DefaultFrameRate;
}
subNode = node.SelectSingleNode("DefaultEncoding");
if (subNode != null)