Merge pull request #1411 from ivandrofly/patch-714

[Fix] - Fix 'Button Ok' (src/Forms/ChangeFrameRate.cs)
This commit is contained in:
Nikolaj Olsson 2015-11-09 19:02:22 +01:00
commit 7946b55718

View File

@ -71,15 +71,16 @@ namespace Nikse.SubtitleEdit.Forms
private void ButtonOkClick(object sender, EventArgs e) private void ButtonOkClick(object sender, EventArgs e)
{ {
double d; if (comboBoxFrameRateFrom.Text.Trim() == comboBoxFrameRateTo.Text.Trim())
if (double.TryParse(comboBoxFrameRateFrom.Text, out d) &&
double.TryParse(comboBoxFrameRateTo.Text, out d))
{
DialogResult = DialogResult.OK;
}
else if (comboBoxFrameRateFrom.Text.Trim() == comboBoxFrameRateTo.Text.Trim())
{ {
MessageBox.Show(Configuration.Settings.Language.ChangeFrameRate.FrameRateNotChanged); MessageBox.Show(Configuration.Settings.Language.ChangeFrameRate.FrameRateNotChanged);
return;
}
double d;
if (double.TryParse(comboBoxFrameRateFrom.Text, out d) && double.TryParse(comboBoxFrameRateTo.Text, out d))
{
DialogResult = DialogResult.OK;
} }
else else
{ {