OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 8 Sep 2009 17:32:48 +0000 (17:32 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Tue, 8 Sep 2009 17:32:48 +0000 (17:32 +0000)
- Fixed exceptions in PictureSettings - Thanks exdeus

git-svn-id: svn://localhost/HandBrake/trunk@2808 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Changelog.html
win/C#/Controls/PictureSettings.cs

index 787686c..000b945 100644 (file)
@@ -30,6 +30,8 @@ Windows Platform Specific Changlog.<br />
     - A culture issue with the Video Quality slider. Should now work correctly for systems which represent floats as 1,25 instead of 1.25<br />\r
     - Issue with SRT filepaths not being quoted.<br />\r
     - An issue with 8x8dct not saving correctly in presets<br />\r
+    - Activity log window would sometimes not display the CLI query used <br />\r
+    - Couple issues in the Picutre Settings code <br />\r
 \r
     \r
     <h4>Backend / Not important changes</h4>\r
index 1d54c98..eed7ba5 100644 (file)
@@ -67,10 +67,15 @@ namespace Handbrake.Controls
                     labelDisplaySize.Text = CalculateAnamorphicSizes().Width + "x" + CalculateAnamorphicSizes().Height;\r
                 }\r
 \r
-                updownDisplayWidth.Value = CalculateAnamorphicSizes().Width;\r
+                //updownDisplayWidth.Value = CalculateAnamorphicSizes().Width;\r
                 updownParWidth.Value = _sourceTitle.ParVal.Width;\r
                 updownParHeight.Value = _sourceTitle.ParVal.Height;\r
-                _cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value;\r
+                //_cachedDar = (double)updownDisplayWidth.Value / (double)text_height.Value;\r
+\r
+\r
+                Size croppedDar = CalculateAnamorphicSizes();\r
+                _cachedDar = (double) croppedDar.Width/croppedDar.Height;\r
+                updownDisplayWidth.Value = croppedDar.Width;\r
             }\r
         }\r
 \r
@@ -263,8 +268,9 @@ namespace Handbrake.Controls
                 // DAR = DISPLAY WIDTH / DISPLAY HEIGHT (cache after every modification)\r
 \r
                 // Calculate new Height Value\r
-                int modulus = 16;\r
-                int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus);\r
+                int modulus;\r
+                if(!int.TryParse(drp_modulus.SelectedItem.ToString(), out modulus))\r
+                    modulus = 16;\r
 \r
                 int rawCalculatedHeight = (int)((int)updownDisplayWidth.Value / _cachedDar);\r
                 int modulusHeight = rawCalculatedHeight - (rawCalculatedHeight % modulus);\r