From d5844b459d902f6fc19dc13b5ab35fc48e593b95 Mon Sep 17 00:00:00 2001 From: sr55 Date: Sat, 19 Nov 2011 21:27:03 +0000 Subject: WinGui: Fix a issue where audio controls would disable sometimes if there was only one audio track on the source. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@4359 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- win/CS/Controls/AudioPanel.cs | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/win/CS/Controls/AudioPanel.cs b/win/CS/Controls/AudioPanel.cs index e07cf1e3a..a7728ae56 100644 --- a/win/CS/Controls/AudioPanel.cs +++ b/win/CS/Controls/AudioPanel.cs @@ -361,6 +361,8 @@ namespace Handbrake.Controls // Set the Advanced Control. if (!advancedAudio.IsDisposed) advancedAudio.Track = track; + + this.RefreshEnabledControls(); } } } @@ -586,6 +588,28 @@ namespace Handbrake.Controls #region Private Functions + /// + /// Refresh the enabled controls + /// + private void RefreshEnabledControls() + { + // Configure the widgets with values + if (drp_audioEncoder.Text.Contains("Passthru")) + { + drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = false; + } + else + { + drp_audioMix.Enabled = drp_audioBitrate.Enabled = drp_audioSample.Enabled = btn_AdvancedAudio.Enabled = true; + } + + if (drp_audioEncoder.Text.Contains("Flac")) + { + drp_audioBitrate.Enabled = false; + } + } + + /// /// Attempt to automatically select the correct audio tracks based on the users settings. /// -- cgit v1.2.3