summaryrefslogtreecommitdiffstats
path: root/win/C#/Functions
diff options
context:
space:
mode:
authorsr55 <[email protected]>2010-07-04 17:50:37 +0000
committersr55 <[email protected]>2010-07-04 17:50:37 +0000
commit7139bd97551c5f8a521295599f0bf294a00cd3dd (patch)
tree075518b4ab1565c438fcd41b398263e60be96e99 /win/C#/Functions
parentdaec13f6144419aa5efdada8598500f2d48cefac (diff)
WinGui:
- Next step in the new Add Presets Window. Now added Picture Size modes "None" and "Source Maximum". Note cropping values are stored with "Source Maximum" if custom crop is selected. Also included option to include filter settings. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@3425 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Functions')
-rw-r--r--win/C#/Functions/PresetLoader.cs29
-rw-r--r--win/C#/Functions/QueryGenerator.cs2
2 files changed, 14 insertions, 17 deletions
diff --git a/win/C#/Functions/PresetLoader.cs b/win/C#/Functions/PresetLoader.cs
index 9b6d154ad..649804914 100644
--- a/win/C#/Functions/PresetLoader.cs
+++ b/win/C#/Functions/PresetLoader.cs
@@ -29,7 +29,7 @@ namespace Handbrake.Functions
/// <param name="pictureSettings">
/// Save picture settings in the preset
/// </param>
- public static void LoadPreset(frmMain mainWindow, QueryParser presetQuery, string name, bool pictureSettings)
+ public static void LoadPreset(frmMain mainWindow, QueryParser presetQuery, string name)
{
#region Source
@@ -83,22 +83,19 @@ namespace Handbrake.Functions
#region Picture
mainWindow.PictureSettings.check_autoCrop.Checked = true;
- if (pictureSettings) // only Load picture settings if the perset requires it
+ if (presetQuery.CropValues != null)
{
- if (presetQuery.CropValues != null)
- {
- int top, bottom, left, right;
- int.TryParse(presetQuery.CropTop, out top);
- int.TryParse(presetQuery.CropBottom, out bottom);
- int.TryParse(presetQuery.CropLeft, out left);
- int.TryParse(presetQuery.CropRight, out right);
-
- mainWindow.PictureSettings.check_customCrop.Checked = true;
- mainWindow.PictureSettings.crop_top.Value = top;
- mainWindow.PictureSettings.crop_bottom.Value = bottom;
- mainWindow.PictureSettings.crop_left.Value = left;
- mainWindow.PictureSettings.crop_right.Value = right;
- }
+ int top, bottom, left, right;
+ int.TryParse(presetQuery.CropTop, out top);
+ int.TryParse(presetQuery.CropBottom, out bottom);
+ int.TryParse(presetQuery.CropLeft, out left);
+ int.TryParse(presetQuery.CropRight, out right);
+
+ mainWindow.PictureSettings.check_customCrop.Checked = true;
+ mainWindow.PictureSettings.crop_top.Value = top;
+ mainWindow.PictureSettings.crop_bottom.Value = bottom;
+ mainWindow.PictureSettings.crop_left.Value = left;
+ mainWindow.PictureSettings.crop_right.Value = right;
}
// Set the anamorphic mode 0,1,2,3
diff --git a/win/C#/Functions/QueryGenerator.cs b/win/C#/Functions/QueryGenerator.cs
index f29bdd4fe..2c4706f71 100644
--- a/win/C#/Functions/QueryGenerator.cs
+++ b/win/C#/Functions/QueryGenerator.cs
@@ -219,7 +219,7 @@ namespace Handbrake.Functions
string cropLeft = mainWindow.PictureSettings.crop_left.Text;
string cropRight = mainWindow.PictureSettings.crop_right.Text;
- if (mainWindow.PictureSettings.check_customCrop.Checked)
+ if (mainWindow.PictureSettings.check_customCrop.Checked && mode != QueryPictureSettingsMode.None)
{
if (mainWindow.PictureSettings.crop_top.Text == string.Empty)
cropTop = "0";