diff options
author | sr55 <[email protected]> | 2009-06-17 18:37:28 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-06-17 18:37:28 +0000 |
commit | 369338c32344dcf54cca78efaa95f57f83bed7c9 (patch) | |
tree | 14628ec6bcc1436e6cb122a577467fecc56a1948 /win/C#/Functions/PresetLoader.cs | |
parent | cae0260e2b7ed70d42bda7b29133a7134ddca0f6 (diff) |
WinGui:
- Tweak the presetLoader and Picture settings panel to work a bit better with built-in presets. Sets width/height then sets anamorphic mode (instead of vice-versa). This forces the calculation code to run which should correct the weird numbers that were appearing.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2558 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/PresetLoader.cs')
-rw-r--r-- | win/C#/Functions/PresetLoader.cs | 27 |
1 files changed, 13 insertions, 14 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs index 6428097b1..251735aec 100644 --- a/win/C#/Functions/PresetLoader.cs +++ b/win/C#/Functions/PresetLoader.cs @@ -90,16 +90,6 @@ namespace Handbrake.Functions }
}
- // Set the anamorphic mode 0,1,2,3
- mainWindow.pictureSettings.drp_anamorphic.SelectedIndex = presetQuery.AnamorphicMode;
-
- // Custom Anamorphic Controls
- mainWindow.pictureSettings.check_KeepAR.CheckState = presetQuery.keepDisplayAsect ? CheckState.Checked : CheckState.Unchecked;
- mainWindow.pictureSettings.txt_displayWidth.Text = presetQuery.displayWidthValue.ToString();
- mainWindow.pictureSettings.txt_parWidth.Text = presetQuery.pixelAspectWidth.ToString();
- mainWindow.pictureSettings.txt_parHeight.Text = presetQuery.pixelAspectHeight.ToString();
- mainWindow.pictureSettings.drop_modulus.SelectedItem = presetQuery.AnamorphicModulus;
-
// Reset maxWidth and MaxHeight to 0
mainWindow.pictureSettings.maxWidth = 0;
mainWindow.pictureSettings.maxHeight = 0;
@@ -107,11 +97,10 @@ namespace Handbrake.Functions // Set the width and height
if (presetQuery.Width != 0)
mainWindow.pictureSettings.text_width.Value = presetQuery.Width;
+ else if (presetQuery.MaxWidth == 0)
+ mainWindow.pictureSettings.text_width.Value = 0;
- if (presetQuery.Height != 0)
- mainWindow.pictureSettings.text_height.Value = presetQuery.Height;
- else
- mainWindow.pictureSettings.text_height.Value = 0;
+ mainWindow.pictureSettings.text_height.Value = presetQuery.Height != 0 ? presetQuery.Height : 0;
// Max Width/Height override Width/Height
if (presetQuery.MaxWidth != 0)
@@ -127,6 +116,16 @@ namespace Handbrake.Functions }
mainWindow.pictureSettings.setMax();
+ // Set the anamorphic mode 0,1,2,3
+ mainWindow.pictureSettings.drp_anamorphic.SelectedIndex = presetQuery.AnamorphicMode;
+
+ // Custom Anamorphic Controls
+ mainWindow.pictureSettings.check_KeepAR.CheckState = presetQuery.keepDisplayAsect ? CheckState.Checked : CheckState.Unchecked;
+ mainWindow.pictureSettings.txt_displayWidth.Text = presetQuery.displayWidthValue.ToString();
+ mainWindow.pictureSettings.txt_parWidth.Text = presetQuery.pixelAspectWidth.ToString();
+ mainWindow.pictureSettings.txt_parHeight.Text = presetQuery.pixelAspectHeight.ToString();
+ mainWindow.pictureSettings.drop_modulus.SelectedItem = presetQuery.AnamorphicModulus;
+
#endregion
|