From 5552e4ba9041e0a810fb63dd175a62de48826906 Mon Sep 17 00:00:00 2001 From: sr55 Date: Tue, 8 Sep 2009 17:32:48 +0000 Subject: WinGui: - Fixed exceptions in PictureSettings - Thanks exdeus git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2808 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/Changelog.html | 2 ++ win/C#/Controls/PictureSettings.cs | 14 ++++++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) (limited to 'win') diff --git a/win/C#/Changelog.html b/win/C#/Changelog.html index 787686c56..000b94598 100644 --- a/win/C#/Changelog.html +++ b/win/C#/Changelog.html @@ -30,6 +30,8 @@ Windows Platform Specific Changlog.
- A culture issue with the Video Quality slider. Should now work correctly for systems which represent floats as 1,25 instead of 1.25
- Issue with SRT filepaths not being quoted.
- An issue with 8x8dct not saving correctly in presets
+ - Activity log window would sometimes not display the CLI query used
+ - Couple issues in the Picutre Settings code

Backend / Not important changes

diff --git a/win/C#/Controls/PictureSettings.cs b/win/C#/Controls/PictureSettings.cs index 1d54c9867..eed7ba560 100644 --- a/win/C#/Controls/PictureSettings.cs +++ b/win/C#/Controls/PictureSettings.cs @@ -67,10 +67,15 @@ namespace Handbrake.Controls labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height; } - updownDisplayWidth.Value = CalculateAnamorphicSizes().Width; + //updownDisplayWidth.Value = CalculateAnamorphicSizes().Width; updownParWidth.Value = _sourceTitle.ParVal.Width; updownParHeight.Value = _sourceTitle.ParVal.Height; - _cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value; + //_cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value; + + + Size croppedDar = CalculateAnamorphicSizes(); + _cachedDar = (double) croppedDar.Width/croppedDar.Height; + updownDisplayWidth.Value = croppedDar.Width; } } @@ -263,8 +268,9 @@ namespace Handbrake.Controls // DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification) // Calculate new Height Value - int modulus = 16; - int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus); + int modulus; + if(!int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus)) + modulus = 16; int rawCalculatedHeight = (int)((int)updownDisplayWidth.Value / _cachedDar); int modulusHeight = rawCalculatedHeight - (rawCalculatedHeight % modulus); -- cgit v1.2.3