]> granicus.if.org Git - handbrake/commitdiff
WinGui: Fix a issue where audio controls would disable sometimes if there was only...
authorsr55 <sr55.hb@outlook.com>
Sat, 19 Nov 2011 21:27:03 +0000 (21:27 +0000)
committersr55 <sr55.hb@outlook.com>
Sat, 19 Nov 2011 21:27:03 +0000 (21:27 +0000)
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4359 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/CS/Controls/AudioPanel.cs

index e07cf1e3ae403b796636d3508ce215633d340b62..a7728ae56d85db84c85543095becad24e781083d 100644 (file)
@@ -361,6 +361,8 @@ namespace Handbrake.Controls
                     // Set the Advanced Control.\r
                     if (!advancedAudio.IsDisposed)\r
                         advancedAudio.Track = track;\r
+\r
+                    this.RefreshEnabledControls();\r
                 }\r
             }\r
         }\r
@@ -586,6 +588,28 @@ namespace Handbrake.Controls
 \r
         #region Private Functions\r
 \r
+        /// <summary>\r
+        /// Refresh the enabled controls\r
+        /// </summary>\r
+        private void RefreshEnabledControls()\r
+        {\r
+            // Configure the widgets with values\r
+            if (drp_audioEncoder.Text.Contains("Passthru"))\r
+            {\r
+                drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = false;\r
+            }\r
+            else\r
+            {\r
+                drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true;\r
+            }\r
+\r
+            if (drp_audioEncoder.Text.Contains("Flac"))\r
+            {\r
+                drp_audioBitrate.Enabled = false;\r
+            }\r
+        }\r
+\r
+\r
         /// <summary>\r
         /// Attempt to automatically select the correct audio tracks based on the users settings.\r
         /// </summary>\r