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
// Picture Controls\r
private void text_width_ValueChanged(object sender, EventArgs e)\r
{\r
+ if (Properties.Settings.Default.disableResCalc)\r
+ return;\r
+\r
if (_preventChangingWidth)\r
return;\r
\r
}\r
private void text_height_ValueChanged(object sender, EventArgs e)\r
{\r
+ if (Properties.Settings.Default.disableResCalc)\r
+ return;\r
+\r
if (_preventChangingHeight)\r
return;\r
\r
}\r
private void check_KeepAR_CheckedChanged(object sender, EventArgs e)\r
{\r
+ if (Properties.Settings.Default.disableResCalc)\r
+ return;\r
+\r
//Force TextWidth to recalc height\r
if (check_KeepAR.Checked)\r
text_width_ValueChanged(this, new EventArgs());\r
}\r
private void updownDisplayWidth_ValueChanged(object sender, EventArgs e)\r
{\r
+ if (Properties.Settings.Default.disableResCalc)\r
+ return;\r
+\r
if (_preventChangingDisplayWidth == false && check_KeepAR.CheckState == CheckState.Unchecked)\r
{\r
_preventChangingCustom = true;\r
// 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
if (remainder == 0) return value;\r
return (value + remainder);\r
}\r
+\r
+ // Hidden UI feature to drop the MaxWidth / Height with the MaxWidth/Height label is double clicked\r
+ private void lbl_max_DoubleClick(object sender, EventArgs e)\r
+ {\r
+ PresetMaximumResolution = new Size(0,0);\r
+ if (PictureSettingsChanged != null)\r
+ PictureSettingsChanged(this, new EventArgs());\r
+ }\r
}\r
}
\ No newline at end of file