]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Wed, 22 Jul 2009 17:07:06 +0000 (17:07 +0000)
committersr55 <sr55.hb@outlook.com>
Wed, 22 Jul 2009 17:07:06 +0000 (17:07 +0000)
- PictureSettings: Don't reset to source width after every scan or title change. Make sure AR is kept on title change.

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2724 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Controls/PictureSettings.cs

index d3196aec1868cd2566c2fa190b07cb9ae31a7a98..2ad34a4d581b04cb69772982a8e18a9692bac491 100644 (file)
@@ -48,16 +48,12 @@ namespace Handbrake.Controls
                 crop_right.Value = GetCropMod2Clean(_SourceTitle.AutoCropDimensions[3]);\r
 \r
                 // Set the Resolution Boxes\r
-                text_width.Value = _SourceTitle.Resolution.Width;\r
-\r
                 if (drp_anamorphic.SelectedIndex == 0)\r
                 {\r
-                    int width = _SourceTitle.Resolution.Width;\r
-\r
-                    double crop_width = _SourceTitle.Resolution.Width - (double)crop_left.Value - (double)crop_right.Value;\r
-                    double crop_height = _SourceTitle.Resolution.Height - (double)crop_top.Value - (double)crop_bottom.Value;\r
-                    double newHeight = (width * _SourceTitle.Resolution.Width * sourceAspect.Height * crop_height) / (_SourceTitle.Resolution.Height * sourceAspect.Width * crop_width);\r
-                    text_height.Value = (decimal)GetModulusValue(newHeight);\r
+                    if (text_width.Value == 0) // Only update the values if the fields don't already have values.\r
+                        text_width.Value = _SourceTitle.Resolution.Width;\r
+   \r
+                    check_KeepAR.Checked = true; // Forces Resolution to be correct.\r
                 }\r
                 else\r
                 {\r
@@ -68,7 +64,6 @@ namespace Handbrake.Controls
                 updownParWidth.Value = _SourceTitle.ParVal.Width;\r
                 updownParHeight.Value = _SourceTitle.ParVal.Height;\r
                 updownDisplayWidth.Value = calculateAnamorphicSizes().Width;\r
-\r
             }\r
         }\r
 \r