From c88824947aa44722bdafa88552e2e9ba4c560743 Mon Sep 17 00:00:00 2001 From: sr55 Date: Wed, 22 Jul 2009 17:07:06 +0000 Subject: [PATCH] WinGui: - 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 | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs index d3196aec1..2ad34a4d5 100644 --- a/win/C#/Controls/PictureSettings.cs +++ b/win/C#/Controls/PictureSettings.cs @@ -48,16 +48,12 @@ namespace Handbrake.Controls crop_right.Value = GetCropMod2Clean(_SourceTitle.AutoCropDimensions[3]); // Set the Resolution Boxes - text_width.Value = _SourceTitle.Resolution.Width; - if (drp_anamorphic.SelectedIndex == 0) { - int width = _SourceTitle.Resolution.Width; - - double crop_width = _SourceTitle.Resolution.Width - (double)crop_left.Value - (double)crop_right.Value; - double crop_height = _SourceTitle.Resolution.Height - (double)crop_top.Value - (double)crop_bottom.Value; - double newHeight = (width * _SourceTitle.Resolution.Width * sourceAspect.Height * crop_height) / (_SourceTitle.Resolution.Height * sourceAspect.Width * crop_width); - text_height.Value = (decimal)GetModulusValue(newHeight); + if (text_width.Value == 0) // Only update the values if the fields don't already have values. + text_width.Value = _SourceTitle.Resolution.Width; + + check_KeepAR.Checked = true; // Forces Resolution to be correct. } else { @@ -68,7 +64,6 @@ namespace Handbrake.Controls updownParWidth.Value = _SourceTitle.ParVal.Width; updownParHeight.Value = _SourceTitle.ParVal.Height; updownDisplayWidth.Value = calculateAnamorphicSizes().Width; - } } -- 2.40.0