diff options
author | sr55 <[email protected]> | 2009-09-08 17:32:48 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2009-09-08 17:32:48 +0000 |
commit | 5552e4ba9041e0a810fb63dd175a62de48826906 (patch) | |
tree | 07966a81d347aee550a3b6105313440f89a52f60 /win/C#/Controls | |
parent | ca462aa5deeba2b4ffd1b114074d61620cd07e98 (diff) |
WinGui:
- Fixed exceptions in PictureSettings - Thanks exdeus
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2808 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win/C#/Controls')
-rw-r--r-- | win/C#/Controls/PictureSettings.cs | 14 |
1 files changed, 10 insertions, 4 deletions
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);
|