From 80eb2f5952cf5d0250be389f507355b31d42de6c Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 28 Nov 2008 19:57:05 +0000 Subject: WinGui: - Fixes a problem with res calc. - Cleans up the Main.cs file a bit. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1967 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/C#/frmMain.cs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'win/C#/frmMain.cs') diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index e7f31f688..fd9aa78aa 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -948,7 +948,7 @@ namespace Handbrake //Picture Tab private void text_width_TextChanged(object sender, EventArgs e) { - maxWidth = 0; // Reset max width so that it's not using the MaxWidth -X. Quick hack to allow -X for preset usage. + maxWidth = 0; maxHeight = 0; // Reset max width so that it's not using the MaxWidth -X. Quick hack to allow -X for preset usage. int width; Boolean parsed = int.TryParse(text_width.Text, out width); @@ -960,12 +960,13 @@ namespace Handbrake text_width.BackColor = Color.LightGreen; - if (lbl_Aspect.Text != "Select a Title" && maxWidth != 0 && maxHeight != 0) + if (lbl_Aspect.Text != "Select a Title" && maxWidth == 0 && maxHeight == 0) { if (drp_anamorphic.Text == "None") { int height = hb_common_func.cacluateNonAnamorphicHeight(width, text_top.Value, text_bottom.Value, text_left.Value, text_right.Value, selectedTitle); - text_height.Text = height.ToString(); + if (height != 0) + text_height.Text = height.ToString(); } } } -- cgit v1.2.3