OSDN Git Service

WinGui:
authorsr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 30 Oct 2010 14:01:45 +0000 (14:01 +0000)
committersr55 <sr55@b64f7644-9d1e-0410-96f1-a4d463321fa5>
Sat, 30 Oct 2010 14:01:45 +0000 (14:01 +0000)
- Fix a bug in the audio panel where changing selected audio track would incorrectly set the audio bit-rate control dropdown

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

win/C#/Controls/AudioPanel.Designer.cs
win/C#/Controls/AudioPanel.cs

index 3349ab4..43e5ba8 100644 (file)
@@ -346,6 +346,7 @@ namespace Handbrake.Controls
             // \r
             this.audioList.AllowUserToAddRows = false;\r
             this.audioList.AllowUserToResizeColumns = false;\r
+            this.audioList.AllowUserToResizeRows = false;\r
             this.audioList.BackgroundColor = System.Drawing.Color.White;\r
             this.audioList.ColumnHeadersBorderStyle = System.Windows.Forms.DataGridViewHeaderBorderStyle.None;\r
             this.audioList.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing;\r
index 888c91c..e5f37d6 100644 (file)
@@ -638,8 +638,13 @@ namespace Handbrake.Controls
                 drp_audioBitrate.Items.Add("768");\r
             }\r
 \r
-            if (drp_audioBitrate.SelectedItem == null)\r
+            if (drp_audioBitrate.SelectedItem == null && audioList.SelectedRows.Count == 0)\r
                 drp_audioBitrate.SelectedIndex = drp_audioBitrate.Items.Count - 1;\r
+\r
+            if (drp_audioBitrate.SelectedItem == null && audioList.SelectedRows.Count != 0 && (string)this.audioList.SelectedRows[0].Cells[5].Value == "Auto")\r
+            {\r
+                drp_audioBitrate.SelectedItem = "160";\r
+            }\r
         }\r
 \r
         /// <summary>\r