summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions/PresetLoader.cs
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-06-11 16:55:17 +0000
committersr55 <[email protected]>2009-06-11 16:55:17 +0000
commit85ca8ca9325e10aff5e40d96e3f0d4163f66b917 (patch)
treef945b2f3c3921d074019362b64ec1b2dfacfd6a1 /win/C#/Functions/PresetLoader.cs
parent349af3dd20063d11293e1852bf1e37a86af50ca8 (diff)
WinGui:
- Fixed Keep AR disabled leaded to Aspect ratio being kept for width. - Fixed Max Width / Height display and issues in Query Generator. - Fixed some issues in the Preset Loader. - Crop values are always mod 2 now. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2512 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions/PresetLoader.cs')
-rw-r--r--win/C#/Functions/PresetLoader.cs34
1 files changed, 18 insertions, 16 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index f0c522348..7d5e479c1 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -88,41 +88,43 @@ namespace Handbrake.Functions
mainWindow.pictureSettings.crop_left.Value = left;
mainWindow.pictureSettings.crop_right.Value = right;
}
-
- if (presetQuery.Width != 0)
- mainWindow.pictureSettings.text_width.Text = presetQuery.Width.ToString();
-
- if (presetQuery.Height != 0)
- mainWindow.pictureSettings.text_height.Text = presetQuery.Height.ToString();
}
// 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;
-
- // Set the public max width and max height varibles in frmMain
- // These are used by the query generator to determine if it should use -X or -w / -Y or -h
+
+ // Reset maxWidth and MaxHeight to 0
+ mainWindow.pictureSettings.maxWidth = 0;
+ mainWindow.pictureSettings.maxHeight = 0;
+
+ // Set the width and height
+ if (presetQuery.Width != 0)
+ mainWindow.pictureSettings.text_width.Value = presetQuery.Width;
+
+ if (presetQuery.Height != 0)
+ mainWindow.pictureSettings.text_height.Value = presetQuery.Height;
+
+ // Max Width/Height override Width/Height
if (presetQuery.MaxWidth != 0)
{
- mainWindow.pictureSettings.text_width.Text = presetQuery.MaxWidth.ToString();
- mainWindow.maxWidth = presetQuery.MaxWidth;
+ mainWindow.pictureSettings.text_width.Value = presetQuery.MaxWidth;
+ mainWindow.pictureSettings.maxWidth = presetQuery.MaxWidth;
}
if (presetQuery.MaxHeight != 0)
{
- mainWindow.pictureSettings.text_height.Text = presetQuery.MaxHeight.ToString();
- mainWindow.maxHeight = presetQuery.MaxHeight;
+ mainWindow.pictureSettings.text_height.Value = presetQuery.MaxHeight;
+ mainWindow.pictureSettings.maxHeight = presetQuery.MaxHeight;
}
-
+ mainWindow.pictureSettings.setMax();
#endregion