From 6fc41d211e4cbc3c83bdff3c3327deeb072bc1a3 Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 12 Dec 2014 19:46:03 +0000 Subject: WinGui: Fix an issue with the width/height not exporting in presets. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6598 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/HandBrakeWPF/Services/Presets/Factories/PlistFactory.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'win/CS/HandBrakeWPF') diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistFactory.cs index 7c2a76d60..86fb8c6bc 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/PlistFactory.cs @@ -170,7 +170,7 @@ namespace HandBrakeWPF.Services.Presets.Factories AddEncodeElement(xmlWriter, "PictureDetelecineCustom", "string", parsed.Detelecine == Detelecine.Custom ? parsed.CustomDecomb : string.Empty); // Picture Settings - AddEncodeElement(xmlWriter, "PictureHeight", "integer", parsed.Height.ToString()); + AddEncodeElement(xmlWriter, "PictureHeight", "integer", parsed.MaxHeight.HasValue ? parsed.MaxHeight.Value.ToString() : parsed.Height.HasValue ? parsed.Height.Value.ToString() : "0"); AddEncodeElement(xmlWriter, "PictureKeepRatio", "integer", parsed.KeepDisplayAspect ? "1" : "0"); AddEncodeElement(xmlWriter, "PictureModulus", "integer", parsed.Modulus.ToString()); AddEncodeElement(xmlWriter, "PicturePAR", "integer", ((int)parsed.Anamorphic).ToString()); @@ -178,7 +178,7 @@ namespace HandBrakeWPF.Services.Presets.Factories AddEncodeElement(xmlWriter, "PictureRightCrop", "integer", parsed.Cropping.Right.ToString()); AddEncodeElement(xmlWriter, "PictureTopCrop", "integer", parsed.Cropping.Top.ToString()); AddEncodeElement(xmlWriter, "PictureBottomCrop", "integer", parsed.Cropping.Bottom.ToString()); - AddEncodeElement(xmlWriter, "PictureWidth", "integer", parsed.Width.ToString()); + AddEncodeElement(xmlWriter, "PictureWidth", "integer", parsed.MaxWidth.HasValue ? parsed.MaxWidth.Value.ToString() : parsed.Width.HasValue ? parsed.Width.Value.ToString() : "0"); // Preset Information AddEncodeElement(xmlWriter, "PresetBuildNumber", "string", build); -- cgit v1.2.3