From 9cc5c63d8d1d72240a50dd12f9c5f367b6321983 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 9 Apr 2011 11:35:43 +0000 Subject: WinGui: - Fix a culture issue with user settings (x264) - Made the Preset loader more strict with what settings it can and can't load with regards to video settings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3916 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/Functions/PresetLoader.cs | 23 ++++++++++------------- 1 file changed, 10 insertions(+), 13 deletions(-) (limited to 'win/CS/Functions/PresetLoader.cs') diff --git a/win/CS/Functions/PresetLoader.cs b/win/CS/Functions/PresetLoader.cs index 7b36ab92f..78965f1f9 100644 --- a/win/CS/Functions/PresetLoader.cs +++ b/win/CS/Functions/PresetLoader.cs @@ -206,21 +206,21 @@ namespace Handbrake.Functions break; } - if (presetQuery.VideoBitrate != null) - { - mainWindow.radio_avgBitrate.Checked = true; - mainWindow.text_bitrate.Text = presetQuery.VideoBitrate.ToString(); - } - // Quality if (presetQuery.Quality != null) { mainWindow.radio_cq.Checked = true; - mainWindow.slider_videoQuality.Value = QualityToSliderValue( - presetQuery.VideoEncoder, presetQuery.Quality); + mainWindow.slider_videoQuality.Value = QualityToSliderValue(presetQuery.VideoEncoder, presetQuery.Quality); + mainWindow.check_2PassEncode.CheckState = CheckState.Unchecked; + mainWindow.check_turbo.CheckState = CheckState.Unchecked; } - - mainWindow.check_2PassEncode.CheckState = presetQuery.TwoPass ? CheckState.Checked : CheckState.Unchecked; + else if (presetQuery.VideoBitrate != null) + { + mainWindow.radio_avgBitrate.Checked = true; + mainWindow.text_bitrate.Text = presetQuery.VideoBitrate.ToString(); + mainWindow.check_2PassEncode.CheckState = presetQuery.TwoPass ? CheckState.Checked : CheckState.Unchecked; + mainWindow.check_turbo.CheckState = presetQuery.TurboFirstPass ? CheckState.Checked : CheckState.Unchecked; + } if (presetQuery.Framerate != null) { @@ -235,7 +235,6 @@ namespace Handbrake.Functions if (presetQuery.Framerate != null) { // Constant or Peak Framerate for a set framerate. - if (presetQuery.FramerateMode == FramerateMode.CFR) mainWindow.radio_constantFramerate.Checked = true; else @@ -250,8 +249,6 @@ namespace Handbrake.Functions mainWindow.radio_peakAndVariable.Checked = true; } - mainWindow.check_turbo.CheckState = presetQuery.TurboFirstPass ? CheckState.Checked : CheckState.Unchecked; - #endregion #region Chapter Markers -- cgit v1.2.3